Cascading approval process in Pega

What is the Cascading approval process in Pega?

Defining a series of approvals for a case during the case life cycle. If we want to obtain approvals from multiple people (ex: VP, Director, Manager), we can define the cascading approval process in Pega.

Cascading approval smart shape in Pega


We can implement a cascading approval process in two models:
  1. Reporting Structure
  2. Authority Matrix

Reporting structure:
In this approval model, the approval process uses the Reporting hierarchy of the submitter. If the submitter submits a request, Pega uses the Reporting hierarchy from the operator profile of the submitter and gets approval from them within the organization.

Authority matrix:
To get approval from a set of people both inside and outside of the organization of the submitter. We need to build the approval chain using a set of rules. In this process, we will build an authority matrix and it contains a set of conditions and approvers. The case will obtain approval from each approver in the matrix (PageList).

Cascading approval process with Authority matrix

Scenario: In a Service Request application, a submitter raises an Issue and send for the inspection review process. After completion of the review process, certain repairs will be performed. To perform the repair, it should be allocating some budget and budget allocation has some levels of approvals. We are defining the levels for the approval as below: For example from the below table, if the Budget is >=80000 it should be approved by TP Supervisor, TP Account Office, and TP Account Manager.

 S.No    Budget Approval Level Approver
 1 >=10000 TP Supervisor tpsupervisor
 2 >=40000 TP Account Officer tpacctofficer
 3 >=80000 TP Account Manager tpacctmgr
 4 >=100000 TP Finance Officer tpfinofficer

Configuring cascading approval with an authority matrix

What are the rules required to achieve the authority matrix approach?
  • Decision table
  • Page List
  • Single value property
Add an approval step to a stage and configure the rules as shown below:

We can define the Cascading model in both case type and flow rule (by using Approval Smart shape).

Configuring cascading approval with an authority matrix

Configure a decision table 

The decision table will determine the conditions and populate PageList (TPApprovalList) with the list approvers. On each Page, we have a single value property (ApproverID) to route the assignment for approval. Additionally, we can add properties (values) to each page like what we have added ApprovalLevel in this example.
On the results, the tab selects the "Evaluate all rows" check box to return a list of results. Otherwise, the decision table will return only one result.
We can use the Data page, Data transform, and Activity to populate the list of approvers but configuring authority matrix with decision table will give us the flexibility to update easily and can be delegated to business users.

Configuring cascading approval with an authority matrix with decision table

Let's create a case and see the approver's page list. Create a Service Request case and advance the case till budget allocation. Once the budget is allocated and clicks on submit, pega will call the cascading approval flow (Work-.pxApproval) to populate and route the assignment for approval.

case creation in cascading approval

Tracer we can see pxApproval flow is being called and used Decision able to form the PageList.
PageList for cascading approval
An assignment is routing to the Approvers one after another for approval. 

cascading approval with an authority matrix


So what happens if one of the Approver (ex: second approver) "Reject" the assignment? Still, Pega route the assignment to the third approver from the page list ?. We need to configure those settings on the Stage - step - configure view on the flow tab.

cascading approval with an authority matrix - reject scenario
If the second approver rejected the assignment then the case will be moved to the Alternate stage with a status of "Resolve-Rejected"

cascading approval with an authority matrix - Reject

We can set the SLA for the assignment from Goal& deadline tab.

Cascading approval process with the Reporting structure

The above same scenario we will implement with the reporting structure approval process. In the reporting structure cascading approval process, we have two options to populate the ApproversLsit and route the assignment to the approvers. Pega will build the pyApproversList PageList by using either "Reporting manager" or "Workgroup manager" of the submitter (Current user).

cascading approval with an reporting structure
  1. Reporting manager
  2. Workgroup manager
Look at the Operator profile - work tab, we can see the workgroup name and Reporting structure of the current user.
reporting structure

Cascading approval with reporting structure with Reporting manager

If we select this option, Pega will use the Reporting structure of the Current user and build the Approvers page list.

Approval level:
One - Pega will build the page list with one result with the immediate reporting manager identified in the "Reports to" field. In this example, the tpcoordinator. So here levels of approval are 1.

All - Pega will build the page list with all the reporting managers as per the hierarchy.
Ex: in this case, the pegahelp operator reporting structure as follows 

PegaHelp->TPCoordinator->TPAccountManager->TPAccountOfficer->TPFinanceOfficer->TPVP. 

Pega will route the assignment to all the users one after another for approval. So here levels of approval are 5, which means 5 members have to approve the assignment.

Custom - Pega will evaluate a WHEN rule, if the WHEN is true then it will check for the levels of approval for an assignment to go through the approval process.

cascading approval with an reporting structure - custom level

If the when rule (IssueSeverity) evaluates TRUE then Pega will route the approval assignment in two levels. Current user's direct reporting manager and Reporting manager's reporting manager.
In our example, TPCoordinator->TPAccountManager both the users will get the approval assignment one after another.

What happens if we select the Approval level as Custom and not provided any WHEN and Levels of approval?
cascading approval with an reporting structure - no conditions
Pega will route the approval assignment to all the levels. In this scenario, it will be sent to all 5 managers for approval.

What happens if we select Approval level as Custom and provided WHEN and not provided Levels of approval?
cascading approval with reporting structure -when and no level
Even we have provided the WHEN rule but not given Levels, so Pega will route the assignment to all the managers for approval.

What happens if we select Approval level as Custom and not provided WHEN and provided Levels of approval?
cascading approval with reporting structure - no when but level
In this case, as we have not provided any WHEN rule but provided levels of approval is 2, Pega will evaluate @baseclass.Always when rule and it will be always true. The assignment will be routed for 2 levels of approval.

Cascading approval with reporting structure with Workgroup manager

If we select this option, Pega will use the Current (selected) work group's manager of the Current user and build the Approvers page list.

cascading approval with reporting structure - Workgroup manager

In this example:
Workgroup for pegahelp user is default@TP and manger for default@TP is tpmanager. ----- this is level 1.
tpmanager workgroup is Finance@TP and Finance@TP work group's manager is tpacctofficer---this is Level 2.
tpacctofficer workgroup is Default and Default work group's manager is Administrator@pega.com---this is Level 3.
cascading approval with reporting structure with workgroup manager

Approval Level:

One - Pega will build the page list with one result with the immediate workgroup manager for the workgroup selected in Operator's profile in the Work tab. First Level.

In this example, Workgroup for pegahelp user is default@TP and manger for default@TP is tpmanager, so pega routes the assignment to tpmanager.

All - Pega will build the page list with all the workgroup managers.
Ex: in this case pegahelp operator has 3 levels of workgroup managers as defined above. Pega routes the assignment to all the workgroup managers. All Levels.

Pega will route the assignment to all the users one after another for approval. 

Custom - Pega will evaluate a WHEN rule, if the WHEN is true then it will check for the levels of approval for an assignment to go through the approval process.

All the conditions are the same as in the reporting manager's scenario.

The rejection scenario is also the same as the Authority matrix.



9 comments:

  1. Much appreciated your work and thanks for sharing your knowledge and making things easier to understand.

    ReplyDelete
    Replies
    1. Thanks vijay. Please share with friends on linkedin facebook

      Delete
  2. Read this today morning and it's very well explained!! Have used this 2 years back for a education project client. Was a good refreshing topic for me today .Thanks !!

    ReplyDelete
    Replies
    1. Thanks Raj. Please share with friends on linkedin facebook

      Delete
  3. Great work PegaHelp, Nice explanation and easy to implement.
    Thank you guys.

    ReplyDelete
    Replies
    1. Thanks Satish, Hope you will like other topics as well.

      Delete
  4. How to give work queue routing through Approval step could you please tell??

    ReplyDelete
  5. Very well explained... really thanks pega help

    ReplyDelete
  6. thank you so much for details explanation

    ReplyDelete