You can control flow from a Gateway by creating a Parameter and values to be used as in a Rule. On a conditional Sequence Flow exiting the Gateway, you can specify that the Sequence Flow is followed only when values for that Parameter match the expression specified in the Rule.
Procedure
To create the parameter, under the Process, right-click
Parameters and select
New Parameter.
Click
Next to accept the default Project, Package and Process.
Enter the
Name of the Parameter and its
Type.
Click
Finish to save the Parameter.
To add values to the parameters, highlight the Process and in the Properties view, click the Simulation tab.
Highlight the Parameter that you created, and click
Add Value....
A new value with the name "New Value" is added under the Parameter. Double-click the name to rename the value.
You can also remove values by selecting them and clicking
Remove...
Note: If you change an existing Parameter that is associated with a Gateway, you must also specify a new value for the conditional Sequence Flow (as described in the following task).
To associate thw gateway with the parameter, open the Process and click the Rule Parameter tab.
Enter the name of the Parameter that you created earlier.
Tip: Instead of entering the name of the Parameter, you can use an Eclipse feature called Content Assist. Hold down the
Ctrl key and press the
spacebar. This allows you to select from the available Parameters.
To specify a value for the conditional sequence flow, highlight the Conditional Sequence Flow leaving the Gateway.
In the Properties view, click the Rule tab. This allows you to create an expression using your Parameter and values. For example:
This shows that this Sequence Flow is only traversed when the
isPaperworkCorrect Parameter has the value
Wrong receipts. Any cases with other values for this Parameter will follow the default Sequence Flow.