Back ForwardHow to customize the success and exception windows

Optionally, your application can override the processing and user presentation of activity success and failure messages.

Default operation

By default, when a top-level Process Commander activity completes execution but does not send HTML code to a browser display, it presents a success form, defined by the standard harness rule @baseclass.ActivityStatusSuccess, containing a green checkmark:

Success

Similarly, by default when an activity (at any level) encounters an uncaught Java exception or other failure condition, a red-X window appears with the text "Please contact your system administrator". This window is defined by the standard harness rules @baseclass.ActivityStatusSuccess. The system also adds information about the failure or exception to the Pega log.

Red X

Your application can localize these standard harness rules, to present a different message or a message in a specific language.

Overriding the harness rules

Optionally, you can override either or both of these two standard harness rules to localize the text or change the wording or presentation:

  1. Open the standard harness rule.
  2. Use the Save As toolbar operation (Save As) to copy the rule into an application RuleSet, optionally changing the Applies To key part to Work- or an application-specific class.
  3. Update the copy, referencing properties and sections in your application as desired
  4. Test.

TipIF you override the standard harness rules, keep your harness rules simple, as they may appear in a wide variety of situations. Don't assume that the entire clipboard environment of your application is present and correct.

Overriding the calling activities

AdvancedOptionally, you can override either or both of the standard activities that present the success window and exception windows. Familiarity with Java and Java exceptions is required.

Standard activity @baseclass.ActivityStatusNoContentHandler displays the success harness rule. This activity has no parameters.

Standard activity @baseclass.ActivityExceptionHander displays the exception (failure) harness rule. This activity access a single Java Object parameter that is an instance of the java.util.Map interface. It copies the error information on a page and then uses the @baseclass. ActivityStatusHarness to display the information.

To override the default activities:

  1. Open the standard activity rule.
  2. Use the Save As toolbar operation (Save As) to copy the activity into an application RuleSet, optionally changing the Applies To key part to Work- or an application-specific class.
  3. Update the copy, referencing properties and sections in your application as desired
  4. Test.

CautionIf you override the standard activities, keep your activities simple, as they may execute in a wide variety of situations. Exceptions that occur during exception processing may mask the original cause. Don't assume that the entire clipboard environment of your application is present and correct.

Related topics About Activity rules
How to prevent display of traceback details

UpTechnical category