Steps tab on the Activity form
Use the Steps tab to define a sequential set of instructions, or steps, for an activity to execute. Each step calls a method or supported rule type to perform the required processing.
As a best practice, limit each activity to thirty or fewer steps to promote modularity.
Populating a step
If your activity supports a Declare Trigger or Declare OnChange rule, select an appropriate activity type in the Usage field before populating any steps.
Each numbered row on the Steps tab represents a step. Use the following options to control how the activity processes a step at run time.
|Label|| A unique identifier. |
Enter a short (one-or two-character) string that other steps can reference in their jump criteria. Otherwise, leave this field blank.
Enter two slash marks (//) to comment out a step, or exclude it from execution. A commented-out loop step excludes all child steps from execution.
|Loop (no outline)|| No iteration or loop criteria exists. |
Click to specify loop criteria such as the number of iterations or the type of element to evaluate.
|Loop (with outline)|| Iteration or loop criteria exist. |
Click to review or edit the loop criteria.
|When (no outline)|| No pre-condition or when criteria exist. |
Click to specify a when rule that controls whether a step is executed or skipped.
|When (with outline)|| Pre-condition or when criteria exist. |
Click to review or edit the when criteria. Clear the Enable conditions before this action check box to remove the when criteria.
|Expand|| Parameter details for the specified Method. |
Click to expand the Method Parameters section and provide parameters to the specified method or rule instance.
Click a second time to collapse the section.
|Method|| The method or rule to execute. |
Select a method name from the list or enter a keyword followed by a supported rule instance. This list excludes deprecated methods.
Many methods and instructions require parameters.
|Magnifying glass|| You have specified a keyword and rule in the Method field. |
Click to open the rule.
|Step Page|| |
The context, or page for this step.
Enter a page name from the Pages & Classes tab or leave this field blank to use the primary page of this activity.
Depending on the scenario, you can use additional syntax:
Most methods require a step page to exist. When using the Call or Branch keyword, you can only enter a page name with the same Applies To key part as this activity.
|Description|| Internal documentation. |
Enter a brief description for other developers to understand what this step does.
|Jump (no outline)|| No transition criteria exist. |
Click to define how this step transitions to the next step or jumps to a later step.
|Jump (with outline)|| Transition criteria exist. |
Click to review or edit the transition criteria. Clear the Enable conditions after this action check box to remove the transition criteria.
|Trash bin||Removes a step in an activity.|
|Add a step||Inserts a new step below the step currently in focus.|
Use these options to speed up development of your activity steps:
- Reorder steps using drag-and-drop. Click the number next to any step and drag it to a new position. You cannot use drag-and-drop to change the nesting order of a step. For example, you cannot drag a child step outside of a loop step.
- Reuse or remove steps with right-click actions: Cut, Copy, Paste, Insert above, Insert below, and Add child. You can use these actions on steps within the same activity or between different activities.
- Add new rows by focusing in any field in a step and pressing the
- Click Collapse All Steps to only see top-level steps in the activity.
The API Version field is available when an activity does not use the latest Java version. Use the default value of
03-02 and save the rule form to remove this field.
- Activity form - Completing the Steps tab - Entering Method parameters
The Method Parameters section allows you to pass information from an activity to a method or instruction specified in the Method field of a step.
- Activity form - Completing the Steps tab - Entering preconditions
Use the When button to define a when precondition that conditionally skips execution of a step. The system evaluates whether specified conditions are met before it executes the method or instruction referenced in the step. If false, the rest of the step is skipped.
- Defining step transitions in an activity
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.
- Repeating steps in an activity
Use the Loop button to identify iterations, optional fields that can define an enumeration of or loop condition for this step.
- Calling an automation from an activity
Call an automation from an activity without using a Java step.
- Best practices for writing activities for background jobs
Ensure that work items are processed correctly and that data is not corrupted during a node shutdown by using best practices for writing activities for background jobs.