Configuring steps in an activity
After you create an activity, define a sequential set of instructions, or
steps,
that the activity completes automatically. Each step calls a method or
supported rule type to perform the required processing.
- In the navigation pane of Dev Studio, click Records.
- Expand the Technical category and click Activity.
- Open the activity that you want to configure.
- Optional: To temporarily exclude a step from running by commenting that step out, on the
Steps tab, in the Label field, enter
//.
- Optional: To allow other steps to reference this step in their When or Jump criteria, on the Steps tab, in the Label field, enter a short string.
- Optional: To repeat a step or a contiguous sequence of steps a number of times, click
Loop, and then define a loop.The most common way to loop is to iterate over a Page List property, such as pxResults, by using the For each embedded page option. For more information, see Repeating steps in an activity.
- Optional: To complete a step only if specific parameters fulfill conditions that you define,
click When, and then define the preconditions for the step.For more information, see Activity form - Completing the Steps tab - Entering preconditions.
- Click the Method field, press the Down arrow key, and then select a method or instruction that you want to complete.
- Optional: To set a context for the step that is different than the primary page of the activity,
specify the name of the page or property that you want to use as the context.By default, an activity runs within the context that calls that activity. For example, an activity that a Utility shape calls during case processing runs within the context of pyWorkPage, which is the page that is assigned to the case type. Complete the following steps only if you want to change the default context:
- On the Pages & Classes tab, add the page or property
that you want the system to use at run time.For more information, see Defining the pages and classes of a rule.
- In the Step Page field, enter the name of the property that
you want the step to use as context.Depending on the scenario, you can use additional syntax. For example, if you select the For each embedded page loop in step 6, enter a full property reference to a Page List property, such as pagename.pxResults.
- On the Pages & Classes tab, add the page or property
that you want the system to use at run time.
- Click Expand to see method parameters.
- In the Method Parameters section, configure how your application
applies the method or instruction that you selected in step 8:
- For methods, enter parameters specific to a particular method.
For example, if you selected the Obj-Browse method, in the PageName field, enter the name of the page on which you want to store the results, and then in the ObjClass field, enter the name of the class that you want the method to browse.
- For instructions, such as Call, Branch, Collect, or Queue, enter parameters specific to the rule that is associated with the instruction.
- If you selected Java, in the Java Source field, enter Java source code that you want the activity to run.
For more information, see Activity form - Completing the Steps tab - Entering Method parameters - For methods, enter parameters specific to a particular method.
- Optional: To specify conditions to evaluate after the method in a step runs but before the
activity moves to the next step, click the Jump link, and then
define a transition.For more information, see Defining step transitions in an activity.
- Click Save.
- If your activity contains Java steps, ensure that the activity causes no security
issues by running the Rule Security Analyzer tool before locking a ruleset version.For more information, see Searching for security vulnerabilities in rules.
- Optional: To configure another step in the activity, click Add a step, and then repeat steps 4 through 14.
Previous topic Creating an activity Next topic Activity form - Completing the Steps tab - Entering Method parameters