Branching to another activity
Use the Branch instruction to cause the current activity to find another specified activity and branch to it without a return. When the system executes a Branch step, control transfers to another activity found through rule resolution. Execution of the original activity pauses.
When the branched activity ends, processing of the current activity ends also; no steps after the Branch step are executed.
You can pass parameters to the target activity, or you can share the current activity parameter page with the target activity.
Do not include any steps after a Branch instruction, unless the branch occurs only part of the time (because of a transition) or the later steps can be reached through a label and Jump.
The Branch instruction requires the name of the target activity branched to, and parameters for that activity.
field, type the word
If the second activity is not in the same class as this activity, and not in the same class as the page identified in the Step Page field, identify the Applies To key part of the second activity also, using the format:
|Pass current parameter page?||
Select if you want the current activity's parameter page to be passed to
(shared with) the branch activity, which can alter its contents in any way.
Clear this check box to use the array that appears below the check box to pass parameters to the branch activity, on its own parameter page.
If you select this box, make sure that input parameter values needed by the branch activity are present on the parameter page before the Branch instruction.
Complete values for parameters of the branch activity, if you did not check
Pass current parameter page?
box. Enter literal or
property reference values for each parameter that you want to have a value.
The system creates a parameter page for the branch activity that is unrelated to the calling activity's parameter page.
At runtime, the system uses rule resolution to locate the activity identified in the branch. It transfers control to the activity and passes the parameters supplied. The step page of this step becomes the primary page of the target activity. Processing of the original activity pauses.
When the branched-to activity ends, processing of the original activity also ends. If the original activity was started by another activity using a CALL instruction, processing resumes with that activity.
Checking the method status
This method updates the pxMethodStatus property only if it fails. See How to test method results using a transition.
Previous topic Methods Next topic Calling another activity