Skip to main content

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

How to implement business exception processing with policy overrides

Updated on November 15, 2021

Through OnChange rules and special flows, your application can create application-wide temporary pauses in flow processing — for example, to detect and review exceptions, suspect data or special cases — without altering the flows. This provides an alternative to use of tickets.

For a background on the benefits and purposes of this capability, see Understanding policy overrides and suspended work items.

Configuration overview

This facility requires three components:

  • A property or properties present in a work item that can signify a business exception.
  • An OnChange rule that responds to a business exception by promptly suspending all assignments on all currently executing flows for the work item.
  • A flow that supports independent review of the work item, allowing the reviewer to record a final verdict.
  • A reviewer — an operator holding the Work-.ReviewPolicyOverrides privilege — who assesses the business exception and records, in the work item history, a verdict allowing normal flow processing to resume or end.

1. Define the business exception as a when condition rule

  1. Identify the property or properties that are involved in the test.
  2. Create a when condition rule that is true only when the property or properties assume an unlikely, suspect, or potentially erroneous values. Choose a condition that is rare; that for most work items is false at all times from initial entry through resolution.

2. Create a policy override review flow

1. Create a flow rule to support review of work items that become suspended when the business exception occurred. On the New dialog box, select PolicyOverride in the Template field. Design the flow to meet these criteria:

  • Applies to the class of the suspended work item (or a parent class).
  • Does not create a new work item.
  • Does not change the work item status.
  • Calls, as the last shape before the End shape, the standard flow Work-.FinishPolicyOverride.

This flow may be simple — containing only the Start, End Flow, and Subprocess shapes — or it may require multiple assignments performed by multiple operators. Use the standard flow Work-.PolicyOverride as a starting point.

In the SubProcess Properties panel, complete four flow parameters for the Work-.FinishPolicyOverride flow, to control the email correspondence it produces. You can send correspondence when the review results in a Deny verdict, and when it results in an Allow verdict.

3. Create an OnChange rule

The OnChange rule detects the business exception and starts the review flow.

  1. Select the work type of the work items as the Applies To class.
  2. Complete the OnChange Properties tab. In the When field, reference the when condition rule created in step 1 above.
  3. In the Choose Action field, select Suspend Work Object.
  4. Identify the review flow in the Policy Override flow to run field.
  5. Enter text such as "Too many payees" or the key to a message rule in the Error Message field, characterizing the reason for the suspension.

4. Adjust the routing

By default, the Work-.FinishPolicyOverride flow creates an assignment on the worklist of the operator [email protected], where is the organization owning the work item.

1. Override the router activity Work-.ToPolicyOverrideOperator to route this assignment to a person (or one of a group) who is appropriate to act as a reviewer.

2. Ensure that the Operator ID of this person acquires the privilege Work-.ReviewPolicyOverrides. The standard role PegaRULES:SysAdm4 conveys this privilege, but you can create other roles appropriate to your application and organization.

Use the Tracer tool to test such flows.

5. Ensure that reviewers complete their assignments

Each person who acts as a reviewer must review and act on assignments which have the status Pending-PolicyOverride. To verdict, they can choose Allow or Deny as the flow action.

If they choose Allow, processing resumes and any suspended assignments reappear in worklists or work queues. If they choose Deny, the work item status changes to Resolved-Revoked. Affected users may be notified by email, if configured in the flow. In the unusual case that two or more reviews are underway for one suspended work item, the status changes occur only after all the reviews are complete.

6. Periodically monitor outstanding flow errors

Suspended work items remain suspended until all open reviews are completed.

To see a report of suspended work items, in the header of Dev Studio, click ConfigureCase ManagementToolsWork AdminSuspended Work in Current Work Pool.

To see a list of assignments in suspense, in the header of Dev Studio, click ConfigureCase ManagementToolsWork AdminSuspended Work Assignments.

  • This capability illustrates how procedural rules — such as the flows — can operate with declarative rules — such as the OnChange rules — to directly support business processing. Pegasystems identifies this distinctive combination as the Pro-Dex capability.
  • The Show Policy Override button appears at run time on flows (created or updated in PRPC Version 4.2 SP6 and later) for users who have the @baseclass.FlowViewProDex privilege. This button does not appear on flow actions for which the Auto- generated HTML box on the HTML tab is not selected.

Process category

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