Activities are composed of one or more sequenced steps. Each activity step must specify a method that describes the action the system takes.
A step page is the page in memory on which the method is processed. By default, the activity executes within the context by which it was called. For example, an activity called from a utility shape during case processing executes against the page assigned to the case type (pyWorkPage).
Activities execute steps in numbered order. Loop, When, and Jump indicate an action or condition when you want to repeat steps or alter the sequence in which steps execute.
Calling other activities
Activities can call other activities, allowing a developer to create modular activities and potentially reuse standard activities. Pega Platform provides two methods for running another activity - and .
Pega runs the specified activity, then returns control to the calling activity when the called activity process finishes. Consider two activities, A and B: If A calls B, then control returns to A when B finishes.
Pega runs the specified activity, but control returns to the rule that called the first activity. The original activity ends when the branched activity is complete. Consider two activities, C and D:
If C branches to D, the control returns to the rule that called C when D (the branched activity) finishes.
Parameters define variables that input data to, or return data from, an activity.
Parameters make activities more reusable by allowing you to pass arguments when the activity is called, rather than upfront during development.
- Activity parameters are defined on the Parameters tab on the Activities form.
- Use the notation param.<ParamName> to reference a parameter value.
- Parameter names and values are held on a special clipboard page, known as the parameter page, which is not visible with the Clipboard tool.
To better protect your application, limit how and for whom an activity can run by configuring activity-specific access control. Use the settings on the Security tab of an activity rule to specify the activity type and optionally to restrict which users (or other requestors) can execute the activity.
Use the security settings in the Restrict access section to restrict how — or if — users run the activity at run time.
Select the Allow direct invocation from the client or a service check box to allow users to start this activity directly through user input processing, such as a Submit button or a pyActivity= element in an URL. Clear this if you intend this activity to start from only another activity, through a Call, Branch, or other means.
Caution: For most activities, leave this check box cleared to promote the security of your application. Allowing activities to be started from a URL or other user input (whether the requestor is authenticated or a guest) may let users bypass necessary checking, security, or setup steps.
Select the Require authentication to run check box to require that only authenticated requestors can start this activity. Clear the check box to allow guest users to run this activity if they meet other security and access criteria.
Note: Require authentication to run is selected by default on new activities. In most cases, you do not need to change this selection.
Identify one or more privileges to restrict the users and other requestors that can execute this activity. At runtime, if the user does not belong to an access group that provides access to one of the identified privileges, the execution of the activity fails.
For more information about using the settings in the Restrict access section of the Security tab on an activity, see the Pega Community article Securing an activity.
Select an activity type for the activity to determine whether and how this activity can be referenced in other rules. For example, selecting the Route activity type restricts the use of the activity to routing assignments in the case workflow. The Activity type list provides the following options.
|Activity||Select when no more specific value is applicable. Activities with this value cannot be referenced directly in flow rules.|
|Assembler||Deprecated, do not use.|
|Assign||Select if the activity is referenced from an assignment shape in a flow rule. Assign activities are used to create the assignment and differ from other activity types that may be called from an activity, such as Notify and Route activities.|
|Asynchronous||Select if the activity runs in a background thread asynchronously. The activity can call only these step methods: Load-DataPage, Connect-Wait, and Call-Async-Activity (step instruction to allow a user to load an asynchronous activity).|
|Load Data Page||Select if the activity adds values to data pages. Reference this activity on the Definition tab of a Data Page rule.|
|Locate||Deprecated. Only available for existing activities that use locatable pages.|
|Notify||Select if the activity is used to notify a user or users of a pending assignment.|
|Onchange||Select if the activity is executed automatically by a Declare OnChange rule.|
|Route||Select if the activity is used to route an assignment in a flow rule.|
|Rule Connect||Select if the activity calls a connector rule to interface with an external system.|
|Trigger||Select if the activity is executed automatically by a Declare Trigger rule.|
|Utility||Select if the activity is called from a Utility shape in a flow rule.|
|Validate||Deprecated, do not use.|
For more information about setting the activity type for an activity called from a flow rule, see the Pega Community article Security tab on the Activity form.