When your process requires restricted workflow between two flow objects, you should add a Conditional transition. A Conditional transition indicates that workflow will only occur if specified conditions are met. The special conditions are added by using a PBL-Method in the Condition field in the Transition Properties dialog box.
For example, in an Order Management process, a conditional transition directs instances from the Review Order activity to the Special Care activity if the order status is equal to "Expedite" or "Alert". The PBL-Method for this condition is as follows:
orderStatus in ["Expedite", "Alert"]
After you create the transition, a line with a directional arrow connects the two flow objects on the design workspace. The icon next to the transition indicates that it is a Conditional transition.
As well, the transition's Name, Description or Condition may appear next to it depending on the chosen preference.
Rules
The rules for using conditional transitions are as follows:
Conditional transitions are available for most flow objects, with the exception of End and Multiple. (Global, Global Creation and Global Automatic do not require transitions.)
Flow objects cannot have an unconditional and a conditional transition to the same destination flow object at the same time.
Defining the Condition
The Condition is defined in the Transition Properties dialog box by typing a PBL-Method in the Condition field. By default the transition's name is used as the expected result of the condition.
For example if the transition represents the normal flow then you can name it as OK and the condition is automatically built as result =="OK". This is the default condition and is valid while the condition is empty.
If you manually define a condition then the default condition is no longer valid.
Instance variables can be used in the condition as well.
More than one conditional transition might be required. Multiple conditional transitions flowing out of a flow object are ranked in order to determine the evaluation precedence. The precedence is assigned in ascending order according to the creation order given when the process is first designed in Studio. Nevertheless, the conditional transitions' order can be changed by using the Conditional transitions order properties window that Studio displays in the flow object shortcut menu (right-click on the flow object) when more than one conditional transition has been defined.
The syntax is automatically checked. If everything is correct, a blue flag appears on the upper-right corner of the Conditional field. If something is incorrect, a red flag appears. Drag the mouse over the red line below the red flag and the error displays. In addition, the error is shown at the bottom of the dialog box if you click on the statement that has the problem.
Click OK to close the Transition Properties dialog box. When the dialog box closes, the last check is performed. If something was not corrected, the error message will display.
See Process Business Language Programming Guide for further information.