Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Activity-End method

Updated on August 10, 2022

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.

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us