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 a few preinstalled workflows to help manage the label lifecycle. The available workflows include a simple approval process, when a single approval is required, a two-step approval process, where two different users have to approve document, and a delayed publishing approval process, where document can be approved today and will be published automatically at a specified time.

Customers can create new workflows that perfectly fit their approval processes, which might vary for different types of documents. New workflows can also be leveraged to allow different groups of people to approve different documents.

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

Solution

Each workflow is defined in a few tables inside the NiceLabel Control Center database. A default database name is NiceAN, but it can be changed during the installation.

NOTE: When adding new items in the tables make sure that you 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 number of the record in a table.
  • Name. Defines name of the workflow process as is visible in Control Center GUI.
  • Description. Defines short description of the workflow process as is visible in Control Center GUI.
TABLE Nan.WorkflowStep

This table contains available workflow steps for all defined workflows.

  • ID. Defines unique identifier of a workflow step. It is used in a table nan.WorkflowStepSequence.
  • Name. Defines name of a workflow step.
  • WorkflowId. Connects the current step with the workflow in a table nan.Workflow.
  • InitialState. Defines initial state for the workflow. One workflowstep entry must be defined with the initial state.
  • RequireLogin. Enables the »digital signature« feature. When set to 1, NiceLabel prompts the user to re-authenticate before he can proceed.
  • StateId. Defines a state of that document occupies in this step. The available steps are listed in table nan.WorkflowStepState and must not be changed.
    State can be any of the following:
    - Working. File editing is enabled. Field value is 1.
    - Locked. File is locked for editing. Field value is 2.
    - Published. File is marked as published. Field value is 3.
  • NotificationEmails. Notification step changes are sent to the listed e-mails when the document reaches the current step. Emails can be configured in the Control Center GUI.
TABLE Nan.WorkflowStepSequence

This table contains transitions from one workflow step to another.

  • ID. Defines the unique Id number of the record in a table.
  • WorkflowStepIdFrom. Id of a source step.
  • WorkflowStepIdTo. Id of a destination step.
  • UniqueUserRequired. Step transition is not allowed if the same user created previous step transition (example: for two step approvals, one user cannot approve document in both steps).
  • AutomaticTransition. Step can be automatically transitioned. This is used for delayed publishing, when the system publishes the approved file on 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 therefore users inside these profiles).

  • ID. Defines the unique Id number of the record in a table.
  • WorkflowStepSequenceId. Defines Id of step sequence from table nan.WorkflowStepSequence.
  • SecurityProfileId. Defines Id of security profile that is allowed to create the step transition. Users that are members of this security profile can change the workflow step.

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

Print document   Email document

Feedback

Did this article help you? *