Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Defining step transitions in an activity

Updated on May 31, 2022

Use the blue Jump button to open a pop-up dialog, and identify transitions, optional fields that can end iteration, terminate the activity, or cause control to jump to a later (higher-numbered) labeled step. Use transitions to specify conditions that are evaluated after the method in the step is performed, but before the execution continues with other steps.

Often a transition condition tests whether the method in the current step was successful. See How to test method results using a transition for more on this use of transitions.

Use the add row and delete row icons to define the condition. Order is significant. You can rearrange the order by selecting the row number and dragging it up or down. Click OK to save your edits and close the dialog.

FieldDescription
Enable conditions after this action Select to activate the transition. If this box is not selected, all rows of the transition are hidden and are ignored at run time. The gray Jump button is available.
On exception, Jump to a later step label:Optional. If you anticipate that this method might cause a Java exception, enter the label of a higher-numbered step to execute next. This can prevent users from seeing any evidence of the exception, such as the red X. This setting does not apply if an exception occurs in a precondition to the step.
When Identify a when condition rule that the transition is to evaluate. Alternatively, enter an expression that returns true or false, starting with =.

Click the Open icon to review or update the when condition rule. Click to start the Expression Builder.

You can use the keyword <CURRENT> within the precondition and transition elements of a step that also includes a repeat element to evaluate the current element of the repeat.

If True

Select which action the system is to take when the when condition or conditions evaluate to true. Complete both an If True and If False option for each row.

  • Continue Whens — Advance to the next row of the transition.
  • Skip Whens — Skip all the other, later rows of the transition.
  • Jump to Later Step — Jump to a higher numbered step that contains the specified label. Indicate which step to jump to by entering the step's Label name in the True Param field. After the activity jumps to the specified step, it processes that step and later steps in the activity. You cannot use Jump to Later Step to transfer control to a label of a lower-numbered step.
  • Skip Step — End processing of this step, continuing at the next step. If the current step involves an iteration, this choice operates similarly to a break statement in many programming languages.
  • End Activity — End execution of this activity. This is similar to the Exit-Activity method, not the Activity-End method.
True Param If you selected Jump to Later Step for the If True field, enter the label of a higher-numbered step to jump to.

If the If True value is Jump to Later Step and the transition is true, but this field is empty, a Java exception occurs.

If FalseSelect what action the system is to take if the condition evaluates to false. The choices are the same as those for If True . Complete both an If True and If False option for each row.False Param If you selected Jump to Later Step for the If False field, enter the label of a higher-numbered step to jump to.

If the If False value is Jump to Later Step and the transition is false, but this field is empty, a Java exception occurs.

Note:

You cannot use an iteration to jump from outside an iteration sequence to any child step within the iteration. You can jump to the parent step — first step (NNN.0) of an iteration sequence. From a child step in an iteration, you can jump to a later step within the iteration or to a later step outside that iteration.

When a method in an activity step affects the value of a property referenced in a Declare Expression rule, the declarative rule execution occurs before the system evaluates the transition. For example, if the method updates the value of a Diameter property, and a Declare Expression rule computes a CircleArea property based upon the Diameter value, only the updated CircleArea value is available to the transition.

When a step contains an enabled when-based transition, the Tracer shows a step status of "Good" regardless of the step status that existed before the transition evaluation. This status is consistent with the processing status that will be perceived by the next activity step; it reflects that any error condition that existed is "noted" by the activity.

  • Testing method results using a transition

    As an activity executes, the method referenced in each step (implemented in Java) is called and executes. Most methods update the pxMethodStatus property on the pxThread page with a status that starts with one of the values Good:, Warn :, or Fail:. These three values are prefixes to a message key that is looked up as a field value rule.

  • Previous topic Activity form - Completing the Steps tab - Entering preconditions
  • Next topic Testing method results using a transition

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us