Featured post

GetNextWork functionality in pega

What is GetNextWork in pega? Pega provided a functionality to get the most urgent assignment(task) for user to work on. This is configured o...

Cascading approval process in Pega

What is 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 cascading approval process in pega.

Cascading approval smart shape in pega


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

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

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

Cascading approval process with Authority matrix

Scenario: In a Service Request application, a submitter raise an Issue and send for inspection review process. After completion of review process certain repair will be performed. In order 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 authority matrix approach ?
  • Decision table
  • Page List
  • Single value property
Add a approval step to in a stage and configure the rules as shown below:

We can define 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 

Decision table will determine the conditions and populate PageList (TPApprovalList) with the list approvers. In 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 tab select "Evaluate all rows" check box to return list of results. Otherwise, the decision table will return only one result.
We can use Data page, Data transform and Activity to populate the lsit of approvers but configuring authority matrix with decision table will give us a 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 approvers page list. Create a Service Request case and advance the case till budget allocation. Once the budget is allocated and click 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
Assignment is routing to the Approvers one after other for the 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 third approver from the page list ?. We need to configure those settings on the Stage - step - configure view on flow tab.

cascading approval with an authority matrix - reject scenario
If the second approver rejected the assignment then case will be moved to 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 Reporting structure

The above same scenario we will implement with reporting structure approval process. In 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 lsit with one result with the immediate reporting manager identified in the "Reports to" field. In this example, tpcoordinator. So here levels of approval is 1.

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

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

Pega will route the assignment to all the users one after other for the approval. So here levels of approval is 5, means 5 members has 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 other.

What happens if we select 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 sending for all 5 managers for the 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 WHEN rule but not given Levels, so pega will route the assignment to all the managers for the 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. 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:
Work group for pegahelp user is default@TP and manger for default@TP is tpmanager. ----- this is level 1.
tpmanager workgorup is Finance@TP and Finance@TP work group's manager is tpacctofficer---this is Level 2.
tpacctofficer workgorup 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 lsit with one result with the immediate work group manager for the work group selected in Operator's profile in work tab. First Level.

In this example, Work group 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 lsit with all the workgroup managers.
Ex: in this case pegahelp operator has 3 levels of work group managers as defined above. Pega routes the assignment to all the work group managers. All Levels.

Pega will route the assignment to all the users one after other for the 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 same as in reporting manager's scenario.

Rejection scenario is also same as Authority matrix.



6 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