Knowledge Base

Creating Custom Approval Workflows

Problem

NOTE: This article is valid for NiceLabel 2017. With NiceLabel 2019, you can create your own approval workflows in the Control Center GUI.

NiceLabel LMS ships with some pre-installed workflows to help you manage your label lifecycles. The available workflows include a simple approval process for single approvals, a two-step approval process, where two different users approve documents, and a delayed publishing approval process, where you approve documents today to be published automatically at a specified time.

You can create new workflows for your approval processes, which might vary for different types of documents. New workflows can also allow different groups of people to approve different documents.

You can configure workflows as part of the platform deployment by updating the system database. This article provides guidance on how to create your own custom workflows in Control Center. NiceLabel also offers professional services to configure workflows based on your requirements. Contact us for a quote.

Solution

Each workflow is defined in a few tables inside the Control Center database. A default database name is NiceAN, but you can change the name during the installation.

NOTE: When adding new items in the tables, use high-enough values for Id fields. Future updates of NiceLabel software might introduce new workflows and they could overwrite your custom workflows. In this example, we use values greater than 100.

Description of table structure:

TABLE Nan.Workflow

This table contains all defined workflows.

  • ID. Defines the unique Id numbers of the records in a table.
  • Name. Defines the names of the workflow processes as you can see them in Control Center GUI.
  • Description. Defines short descriptions of the workflow processes as you can see them in Control Center GUI.
TABLE Nan.WorkflowStep

This table contains available workflow steps for all defined workflows.

  • ID. Defines unique identifiers of workflow steps. Table nan.WorkflowStepSequence uses these IDs.
  • Name. Defines names of the workflow steps.
  • WorkflowId. Connects the current step with the workflow in a table nan.Workflow.
  • InitialState. Defines the initial states for your workflows. For each process, one workflow step entry must be defined with the initial state.
  • RequireLogin. Enables the »digital signature« feature. When set to 1, NiceLabel prompts you to re-authenticate before you can proceed.
  • StateId. Defines the state of the document occupied in this step. The available steps are listed in table nan.WorkflowStepState and must not be changed.
    States can be:
    - Working. The file editing is enabled. The field value is 1.
    - Locked. The file is locked for editing. The field value is 2.
    - Published. The file is marked as published. The field value is 3.
  • NotificationEmails. Control Center sends notification step changes to the listed e-mails when the documents reach the current step. You can configure emails in the Control Center GUI.
TABLE Nan.WorkflowStepSequence

This table contains transitions from one workflow step to another.

  • ID. Defines the unique ID numbers of the records in a table.
  • WorkflowStepIdFrom. ID numbers of source steps.
  • WorkflowStepIdTo. ID numbers of destination steps.
  • UniqueUserRequired. Control Center does not allow step transition in case the same user creates two sequential steps. For example: in the case of two step approval process, the same user cannot approve documents in both steps.
  • AutomaticTransition. You can automatically transition steps. Use this for delayed publishing, when the system publishes the approved file on a defined date/time.
TABLE Nan.WorkflowStepSequenceProfile

This table contains permissions for transitions from one workflow step to another. The table links the workflow steps with the security profiles (and users inside these profiles).

  • ID. Defines the unique ID numbers of the records in a table.
  • WorkflowStepSequenceId. Defines  ID numbers of step sequences from table nan.WorkflowStepSequence.
  • SecurityProfileId. Defines  ID numbers of security profiles that are allowed to create the step transitions. Users that are members of this security profile can change the workflow steps.

To help you get started with your custom workflows, download and explore the ZIP file that installs a definition for the new two-step approval process. The ZIP contains .SQL files that execute in your Microsoft SQL Server, where NiceLabel Control Center database (NiceAN) is installed. Each .SQL file adds necessary records in the respective table.

Print document   Email document

Feedback

Did this article help you? *