Creating an activity
Create an activity by selecting
Activity from the
Field Description Apply to Select the class to which this activity applies. If your activity is to be referenced in a flow, identify a work type (the Work- class or a class derived from the Work- base class).
The list of available class names depends on the ruleset that you select. Each class can restrict applying rules to an explicit set of rulesets as specified on the Advanced tab of the class form.
Identifier Enter a name for this activity, starting with a letter and containing only letters, numbers, and hyphens. Choose a name that is unique within the Apply to
class. The name must be a valid Java identifier; see How to enter a Java identifier.
The length of the class name plus the length of theIdentifier
cannot exceed 128 bytes.
Template Select a template activity name to automatically set the activity type (and in some cases add pre-populated steps to the form):
Route— Sets the Activity Type and adds three Property-Set steps.
Locate— Sets the Activity Type .
Trigger— Sets the Activity Type .
Utility— Sets the Activity Type and a Property-Set step.
Outto indicate whether the parameter is used for input to the called activity or output from the activity.The system does not prevent setting the value of an In parameter. A called activity can access and change both In and Out parameters on the parameter page.
Select Actions > Preview or type the equivalent keyboard shortcut
CTRL+ALT+Pto see a step-by-step verbalization or English text description of this activity (informally known as the "Describe This Rule" presentation). The system creates an HTML topic describing each step of the activity, with links to other rules referenced by the step.
If your activity contains Java steps, run the Rule Security Analyzer before locking a ruleset version, to look for possible security issues.
The standard function callActivity() in the Pega-RULES Utilities library calls an activity, but returns only void, not a value result. You can execute an activity in an expression, but only for its side effects. Identify the primary page, the activity, and the parameter page. For example:
@Pega-RULES:Utilities.callActivity(pyWorkPage, MyActivity, tools.getParameterPage());
- 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.
- Configuring a property security rule
Enter the privilege an operator needs in order to access the property secured by this rule. Operators who attempt to access the property in the Report Browser must have at least one of the privileges specified on the property security rule.
- Defining the local variables for an activity
Use the Local Variables section to create scalar variables.
- Activity form - how to create activities for flows
Use these instructions to create activities that can be called directly in flows.