Skip to main content
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

Activity structure

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 a page in memory on which the method is processed. By default, the activity runs in the context by which it is called. For example, an activity that is called from a utility shape during case processing runs against the page assigned to the case type (pyWorkPage).

In the following image, click the + icons to learn more about configuring an activity:

Action activities

Activities run steps in numbered order. Loop, When, and Jump indicates an action or condition when you want to repeat steps or alter the sequence in which steps run. 

In the following image, click the + icons to learn more about activity actions and conditions:

Methods to call other activities

Activities can call other activities, which allows a developer to create modular activities and potentially reuse standard activities. Pega Platform provides two methods to run another activity: Call and Branch.


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 Platform runs the specified activity, but the control returns to the rule that calls the first activity. The original activity ends when the branched activity is complete. Consider two activities, C and D: If C branches to D, when D (the branched activity) is complete, the control returns to the rule that called activity C.

Note: To learn more about creating an activity, see Creating an activity.


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 restrict which users (or other requestors) can run the activity.

Security tab of an Activity

Restrict access

Use the security settings in the Restrict access section to restrict how — or if — users run the activity at run time.

Select the Allow invocation from browser 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 run 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.

Note: To learn more about using the settings in the Restrict access section of the Security tab on an activity, see Securing an activity.

Activity type

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 type Description
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-DataPageConnect-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 run 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 run 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.
Note: To learn more about setting the activity type for an activity called from a flow rule, see Security tab on the Activity form.

Activity best practices


  • Whenever possible, use alternative rule types, such as using a data transform to set a property value.
  • Avoid using hard-coded reusable values in properties, for example, URLs or classes. Instead, use data pages, decision tables, or map values.
  • Keep activities short. Limit your activities to fewer than 25 steps, and focus each activity on completing one task.
  • Use reusable activities.
  • Use the Description field to describe what each activity step does.
  • Set an appropriate Activity type in the Security tab to remove warnings. For example, Utility (default), Validate, and Load Data Page.


  • Reduce or eliminate the use of duplicate loops to improve application performance.
  • Remove commented lines before merging your rules unless the commented lines help clarify the details of the activity.
  • Avoid using deprecated activity methods.
  • Limit hand-coded Java. Avoid Java steps in activities when standard or custom rule types, library functions, or activity methods are available.
Caution: The Java method allows you to add custom Java code to an activity. Use this method with extreme caution. The use of a custom Java code in activities is a severe violation of Pega application development best practices because it introduces maintainability issues. Use the Access Control Check landing page to identify activity calls that require mitigation. To learn more about the Access Control Check landing page, see Using Access Control Checks.


  • Use parameters to clearly define the inputs and outputs so that system architects understand how the activity is used and increase application maintainability. If the activity needs a specific value to process, pass a scalar parameter rather than a complete page reference.

Check your knowledge with the following interaction:

This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

100% found this content useful

Want to help us improve this content?

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

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice