To transition a workflow activity based on conditions, you must configure the activity connector.
Procedure
-
From the workflow design area, select the connector between the activities that you want to set the conditional transition for.
-
In the Display Name box, enter a name for the condition.
For example, if the condition represents the success scenario, enter success.
-
Based on the previous activity, set the condition for the connector:
-
Previous activity
Property
Value
Example
Decision
Execute when condition is
true or false
To follow this condition when the Decision expression evaluates to false, select false as the value.
Switch
Execute when condition is
The value of the expression that the Switch activity evaluates to. For more information, see Expressions for an Activity Input.
Default
You can set a default transition if the conditional value returns false.
Other
Execute if previous activity status is
-
The status of the previous activity.
-
Set expressions by selecting <Edit...>. For more information, see Expressions for an Activity Input.
To continue to the next activity when the previous activity executed successfully, select Successful as the value.
-
-
If your connectors start from activities other than the Decision or Switch activity, and you want to use Java or JavaScript to specify expressions to determine the activity transition, click the Condition tab.
The expression in the Condition tab must return a Boolean value. To refer to the previous activity, use the activity variable.
In the following example, the expression will not proceed to the next activity if the previous activity did not complete successfully:
activity.exitCode != 0;Note
The Condition tab is not available for activity connectors that start from a Decision or Switch activity because the condition is specified in the activity itself.
-
Click OK.