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:
Routers
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. |
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.
Add a router
To add a router:
-
In the Workflow Builder editor, click . The Add a Step dialog displays.
-
From the Type drop-down list, select Router.
-
In the Name field, enter a name for the user task.
-
Click Create. The step is added to the workspace:
-
Select the step you just added. The side panel sweeps in from the right.
-
Set the router properties.
Router properties
Property | Required | Description |
---|---|---|
Label |
Required |
Label to display in the workflow diagram. |
Routes |
Required |
Section containing routes.
|
Property | Required | Description | ||
---|---|---|---|---|
Target Step |
Required |
The step that should follow the current step. |
||
Name |
Required |
Name of 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 of the route. This label is displayed 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 to use the SemQL editor. For more information on all the attributes, see Workflow attributes.
|
Parallel blocks
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.
Thus, the teams can simultaneously approve the product.
When the product is approved by both teams, the workflow converges.
Add a parallel block
To add a parallel block:
-
Click . The Add a Step dialog displays.
-
From the Type drop-down list, select ParallelBlock.
-
In the Name field, enter a name for the user task.
-
Click Create. The step is added to the workspace:
-
Select the step you just added. The side panel sweeps in from the right.
-
Set the parallel block propertie.
-
Click to add branches and set the branch properties.
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.
|
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 on the branch:
-
In the side panel, by expanding the branch.
When editing, branches are displayed in child diagrams. The button allows you to return to the main diagram.
Property | Required | Description |
---|---|---|
Name |
Required |
Name of the branch. |
Label |
Required |
Label of the current branch. This label is displayed in the workflow diagram as well as in the application. |
Icon |
Optional |
Icon to display in the workflow diagram. |