Transition Conditions
Conditions in transitions can be used for intelligent routing for automatic tasks. Administrators can define a condition for each of multiple transitions to let the workflow know with which of these conditions it should proceed.
Unless the option 'Show transition conditions' was unselected in the workflow process context menu conditions will be displayed as text on top of transitions.
To define a condition, double-click on a transition to open the 'Transition properties' dialog. Enter the condition in the 'Conditions' field and validate it using the 'Validate' button.
If there are workflow scenarios that no condition was defined for another transition can be configured with the option 'Use this transition as an ELSE path' selected. The workflow will proceed with this transition if the conditions for the other transitions were not met.
|
|
Note: Evaluation
Conditions are evaluated while the workflow task is loaded. For that reason, index data that is being added during the final step of workflow tasks such as Call REST Service can not be considered in conditions. To subvert this limitation, a routing task can be placed as the next workflow task, and the condition dependent transitions can be added after the routing task. |
Operators
Both operators specific to Microsoft SQL Server and operators used in programming languages such as C# or Python can be used.
Although the syntax listed is general Structured Query Language, which should be compatible with other RDBMS, there may be minor differences between Microsoft SQL Server, Oracle, and IBM DB2. For operand syntax specific to Oracle and IBM DB2, refer to their product documentation.
| Operator | Description | Explanation |
|---|---|---|
|
is NOT NULL |
The index field is not empty |
A field value must be populated in order for the workflow to proceed with this transition |
|
is NULL |
The index data field has no value |
Conditions can be based on an index data field's value being NULL |
|
= |
Equal |
A field value must be equal to a certain value in order for the workflow to proceed with this transition |
| ='' | Empty |
Conditions can be based on the value of an index data field being empty |
| != |
Not Equal |
Python inequality operator. A field value must be not equal to a specified value in order for the workflow to proceed with this transition |
|
<> |
Not Equal |
MS SQL comparison operator. The index data field value must not be equal to a specified value in order for the workflow to proceed with this transition |
|
> |
Greater Than |
Set a condition based on an index data field value being greater than another specified value |
|
< |
Less Than |
Set a condition based on an index data field value being less than another specified value |
|
>= |
Greater Than or Equal To |
Set a condition based on an index data field value being greater than or equal to another specified value |
|
<= |
Less Than or Equal To |
Set a condition based on an index data field value being less than or equal to another specified value |
|
AND |
Logical AND operator |
All conditions connected with AND must be met in order for the workflow to proceed with this transition |
|
OR |
Logical OR operator |
Only one of two or more conditions must be met in order for the workflow to proceed with this transition |
|
BETWEEN |
Between an Inclusive Range |
Field values must be in a specified range in order for the workflow to proceed with this transition |
|
LIKE |
Search for a Pattern |
A field value must be similar to a specified pattern in order for the workflow to proceed with this transition. Example: LIKE 'a%'; LIKE 'I_vo___' % represents zero, one, or multiple numbers or characters _ represents only one character |
Functions
The following functions are useful for setting conditions.
| Function | Description | Explanation |
|---|---|---|
|
GETDATE() |
Gets the current date |
The following format is returned: YYYY-MM-DD hh:mm:ss.mmm |
Macros
Index data field macros can be also be used in conditions, including primary and dependent fields. Clicking the 'Macros' button opens a dialog with all available macros. The index data field is referred to by [Field_ID] and populated at runtime.
Table Conditions
Line items in the 'Table: Line Items' tab will need to be matched by the following conditions:
| Conditions | Definition |
|---|---|
|
All items in the table |
All items in the table are matched OR the table is empty |
|
At least one item in the table |
At least one item in the table is matched OR the table is empty |
|
None of the items in the table |
None of the items in the table are matched OR the table is empty |
|
All items in the table (must not be empty) |
All items in the table are matched AND the table is NOT empty |
|
At least one item in the table (must not be empty) |
At least one item in the table is matched AND the table is NOT empty |
|
None of the items in the table (must not be empty) |
None of the items in the table are matched AND the table is NOT empty |