The Condition activity lets you add conditional logic to a workflow. This logic can be used to control what happens when the workflow executes. The Condition activity allows you to define logic as an ECMA expression that evaluates to a boolean value.
Each Condition activity must have two outgoing flow paths, one that handles conditions that evaluate to true and another that handles conditions that evaluate to “false”. Optionally, a third flow path can be added to handle error conditions that occur if the ECMA expression evaluation fails.
The Condition activity includes the following properties:
Table 10-15 Condition Activity Properties
Property Name |
Description |
---|---|
Identifier |
A unique string value that identifies the activity. Workflow Builder generates this value automatically in the <Activity>_<N> format, where <Activity> represents the name of the activity and <N> represents an alphanumeric value that contains seven characters. |
Name |
Provides a name for the activity. |
Condition Expression |
Specifies an ECMA expression that returns True or False. The value returned determines which flow path is followed after the activity has finished executing. HINT:If you need to test whether two objects are equal in a conditional expression, you should use the == operator, rather than the equals() method, unless you are certain that the objects being compared are Java objects of the same type. For instance, use this expression: (approval_A.getAction() == "DENIED") instead of this one: (approval_A.getAction()).equals("DENIED") For details on building ECMA expressions, see Section 11.0, Working with ECMA Expressions. For descriptions of the system variables available in a workflow, see Understanding Workflow Data. |
Data items are not supported with this activity.
Email templates are not supported with this activity.
The Problems tab provides details of the errors and warnings associated with the activity in a workflow. For more information about validating workflow activities, see Validating a Workflow.