Skip to main content
LinkedIn
Copied!

Table of Contents

Adding error handling to a case type

Add error handling to a case type to ensure that operators process the work correctly and completely, for example, to ensure that users complete required fields. To add error handling to a case type, you call the czErrorHandler activity or the czErrorHandler data transform from the case type flow.

For example, the out-of-the box Update a contact name case type calls the error handler during post-processing. The following figure shows how the Check Primary Address activity calls the czErrorHandler activity:

Error handling by calling the czErrorHandler activity
Calling an error handler activity for the check primary address activity.

The error handler feature includes extension points in an ErrorHandlerExt activity so that you can customize error processing to meet your specific business needs.

When an error occurs, you can configure the error handler to display a message to the operators and to log the error to the PEGA log file. For more information, see Log files tool.

If the error type is Alert, you can configure an alert message and code to send to Pega Diagnostic Cloud (PDC) for further action.

  1. In the navigation pane of Dev Studio, click App.

  2. In the App pane, select the class and then scroll to find the case type that you want to modify.

  3. Click the Expand icon next to the case type name to show components of the case type, and then click Process Flow to view the case type flow.

  4. Modify the case type flow to call the error handler activity or data transform from the appropriate flow action or step.

    For detailed information about how to modify case types from Dev Studio, see Automating work by creating case types.
  5. Configure the parameters for the error handler.

    For example, if you call the error handler activity from another activity, configure the Method Parameters for that call as shown in the following figure:

    Configure error handling parameters example
    Configure error handling parameters example
    1. In the Message parameter, select the message to display and log.

    2. In the MessagePage parameter, select the page on which to display the message.

      The default is pyWorkPage.
    3. If you do not want to display an error message on the page, for example, if you only want to log the error, clear the SetPageMessages check box.

    4. If you do not want to log the error message in the application error logs, for example, if you only want to display the error on the page, clear the SetLogMessages check box.

    5. In the LoggingLevel parameter, select the error type. The page error message and logged error message both include the error type.

      • Alert
      • Debug
      • Error
      • Info
      • InfoForced
      • Warn
    6. If you set the LoggingLevel to Alert, configure the alert code and message for the application log:

      1. In the AlertCode parameter, select the alert code.
      2. In the AlertMessage parameter, select the alert message.
    7. If you set the LoggingLevel to Alert, configure the alert parameters to send to PDC:

      1. Open the error handler activity or data transform.
      2. For the Generate and report the PDC alerts method, click the Expand to see method parameters icon to display the Method Parameters.
        Alert parameters sent to PDC
        Alert parameters sent to PDC
      3. Enter a value for each alert parameter that the case type sends to PDC.
  6. Click Save.

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