Conditional Transition

Provides detailed information on the Conditional Transition.

When your process requires restricted workflow between two activities, 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 BP-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 BP-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 activities 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.

Note: If you do not want to see the Conditional transitions, disable the Show Conditional Transition property from the View menu, Transitions option.

Rules

The rules for using conditional transitions are as follows:


Defining the Condition

The Condition is defined in the Transition Properties dialog box by typing a BP-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 an activity 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 activity shortcut menu (right-click on the activity) when more than one conditional transition has been defined.

Note: it is highly recommended to name the condition to represent its condition. Furthermore, use the predefined variable result to set the result of it.


Note: It is not recommended to use a variable type ANY because, in order to compare it, you will have to cast it before. If this is not done, the comparison might fail.

See Process Business Language Programming Guide for further information.