Control flows

This page explains how to use control flows in a workflow definition. Control flows are used to create routes and branches that determine the progression of the workflow.

Data-driven workflows, available in Semarchy xDM 2023.1 and later, are subject to specific licensing requirements; please confirm your eligibility to use such new functionality by consulting your license agreement or by contacting your Semarchy account representative prior to use.
All customers can still use the workflow feature available in previous versions (now known as legacy workflows). For more information, see Workflows (legacy).

The following control flows are available:

Router

A router is used to create data-driven routes based on conditions. Record data, step data, and workflow metadata are accessible for creating routing conditions.

Routes are evaluated in the ascending order of their appearance in the Routes section. The position of the routes in the diagram does not affect their position in the Routes section.

Each route is evaluated to check whether it contains conditions and whether the conditions are met. The workflow continues along the first route that satisfies the conditions disregarding the other routes that may also satisfy the conditions.

Only the last route is allowed to not have any conditions. This allows the creation of a default route in case none of the conditions on the preceding routes are met.
Product review for different countries of origin
The sample workflow shown below is meant for authoring products. In this workflow, a router is used to create three routes for reviewing the products based on their countries of origin: the USA, Vietnam, and a default route without any conditions for countries other than the USA and Vietnam.
Thus, when the country of origin of a product is set to USA or Vietnam, the product is sent for review to the data steward in charge of reviewing products originating from that specific country.
When the country of origin of a product is neither the USA nor Vietnam, the workflow moves along the default route. workflow control flow router

Add a router

To add a router:

  1. In the Workflow Builder editor, click workflow add button. The Add a Step dialog displays.

  2. From the Type drop-down list, select Router.

  3. In the Name field, enter a name for the user task.

  4. Click Create. The step is added to the workspace:

    workflow step router

  5. Select the step you just added. The side panel sweeps in from the right.

  6. Set the Router properties.

Router properties

Table 1. Router Properties
Property Required Description

Label

Required

Label to display in the workflow diagram.

Routes

Required

Section containing routes.

  • The workflow add button allows adding routes.

  • The workflow route rearrange button allows rearranging the different routes.

Table 2. Routes
Property Required Description

Target Step

Required

The step that should follow the current step.

Name

Required

Name given to the route.

Index

Required

Read only.

The position of the route as it appears in the Routes section. Changing the route’s position automatically changes its index. However, changing its position in the diagram does not affect its index.

The conditions on the routes are evaluated in ascending order. For example, when three routes are present, the conditions are first evaluated on route 1, then on route 2, and finally on route 3.

Label

Required

Label given to the route. This label displays in the workflow diagram as well as in the application.

Condition

Required

SemQL conditions that are evaluated to determine whether the workflow should progress in the current route.

Click undock to use the SemQL editor.

Refer to Workflow Attributes for more information on all the attributes.

Only the last route is allowed to not have any conditions.

Parallel block

A parallel block is used to create parallel branches. Each branch can be composed of any sequence of steps. The workflow continues into each branch simultaneously. The branches converge when all the steps in all the branches are completed.

Product review for different departments
In the sample workflow shown below for authoring products, a parallel block creates two branches for the sales and marketing teams for approving the product.
Thus, the teams can simultaneously approve the product.
When the product is approved by both teams, the workflow converges. workflow control flow parallel block

Add a parallel block

To add a parallel block:

  1. Click workflow add button. The Add a Step dialog displays.

  2. From the Type drop-down list, select ParallelBlock.

  3. In the Name field, enter a name for the user task.

  4. Click Create. The step is added to the workspace:

    workflow step parallel block

  5. Select the step you just added. The side panel sweeps in from the right.

  6. Set the Parallel block properties.

  7. Click workflow add to add branches and set the Branch properties.

Parallel block properties

Table 3. Parallel Block Properties
Property Required Description

Label

Required

Label to display in the workflow diagram.

Transition

Required

Section containing the To step drop-down list that allows selecting the step that should follow the parallel block.

Branches

Required

Section containing parallel branches.

  • The workflow add button allows adding branches.

  • The workflow route rearrange button allows rearranging the different branches.

Branch properties

Each branch of the parallel block needs to have start and end events and at least one step. A branch may contain user tasks and routers.

In a workflow instance, changes from parallel branches are combined into a single record when exiting the parallel block, i.e., when all branches are completed.

If changes are concurrently made on the same attribute of the same record, the changes performed in the last branch of the parallel block are kept and the changes performed in other branches are ignored during the merge event.

The b_upddate and b_updator built-in fields are respectively set with the date and user of the most recent update performed across all branches.

In a workflow instance, when a record is deleted in a branch, the changes made to the same record in the other branches are stored on the concerned record, which is only soft-deleted at this stage. It is eventually soft or hard-deleted depending on the selected delete policy so that the history data is not lost.

Submit Data type automation steps and other parallel blocks cannot be added in a branch.

You can edit a branch:

  • In the workflow diagram by clicking workflow parallel block branch isolation on the branch:

    workflow parallel block branch

  • In the side panel by expanding the branch.

When editing, branches display in child diagrams. The workflow back main diagram button allows you to return to the main diagram.

Table 4. Branch properties
Property Required Description

Name

Required

Name given to the branch.

Label

Required

Label given to the current branch. This label displays in the workflow diagram as well as in the application.

Icon

Optional

Icon to display in the workflow diagram.