Skip to main content

Table of Contents

Activity-End method


Only available versions of this content are shown in the dropdown

This method appears in activities that support the Pega Platform infrastructure, but is otherwise rarely needed. In ordinary circumstances, use the Exit-Activity method, not Activity-End, to return to a calling activity from an internal step of the current activity.

Use the Activity-End method to cause the system to:

  1. End the current activity and all calling activities (by throwing an exception that is caught).
  2. Transmit any HTML code previously produced to an interactive user.

For example, you can use the Activity-End method to end an activity conditionally in mid-processing.

Processing continues with the next activity on the internal Activity List. If the list is empty, the system presents Status Message information to the user. To hide the Status Message form from the user, provide the user with an HTML form.

This method exits all activities in the current call stack. If one activity calls another activity that executes the Activity-End method, both activities end; the system does not return to the calling activity. Similarly, if Alpha calls Beta, which calls Gamma, which calls Delta, which performs the Activity-End method, all four activities are ended.


This method has no parameters.


All activities on the current execution stack are ended. You cannot check for status messages.

Related Content

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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

Pega Community 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
Contact us