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:
- End the current activity and all calling activities (by throwing an exception that is caught).
- 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.