Logo
  • Products
    • SecOps Studio
  • Solutions
    • Pega Stack Shifter
  • Services
    • Pega Enablement
    • Pega Modernization
  • About
  • Contact
  • Blog
Code Vault

Approval flow in Pega – tutorial

December 10, 2024 Code Vault Curators

This is the continuation of the previous blog article. It is highly recommended to visit the previous blog article before proceeding here!

Approval flow in Pega – Usage and Understanding

In this article, we will build and test three types of approvals.

1. Single approval flow by reporting manager

Here the claims request should be approved or rejected by the reporting manager irrespective of claims amount

2. Cascading approval using the hierarchical structure

When the claims amount is less than $1000 only the claims manager should approve. If it is greater than $1000, then both the claims manager and claims director should approve at cascading level.

3. Cascading approval using a decision matrix

Exact similar requirement to above – When the claims amount is less than $1000 only the claims manager should approve. If it is greater than $1000, then both the claims manager and claims director should approve at the cascading level.

We will achieve it using a decision matrix.

Single approval by the reporting manager.

Step 1: Update the approval step as

Single level – specific user and Reporting manager.

Save the case type.

Step 2: In the current operator form update the routing manager to Claims Manager.

Step 3: Run the Claims Request case type till the approval stage.

Step 4: You can check the pxFlow in the clipboard.

You can find all the open flows

Approval_Flow_1 -> pxApproval – > pxSingleApproval -> pyCascadingGetApproval

Step 5: Login with Claims manager and find the case CR-1002 in the worklist.

Step 6:you can open the assignment and reject the case.

You see the Case got rejected.

This is a single-level approval.

2. Cascading approval using the hierarchical structure

When the claims amount is less than $1000 then only the claims manager should approve. If it is greater than $1000, then both the claims manager and claims director should approve at the cascading level.

Step 1: Update the approval step as cascading type

Approval is based on reporting structure.

Report to be completed by reporting manager.

Step 2: Create two when rules.

ClaimsAmount lesser than 1000 and claims greater than 1000

Step 3: Update custom approval level.

When claims amount lesser than 1000, then approval level should be 1 with claims manager alone.

When claims amount greater than 1000, then level will be 2 with claims manager and claims director approval.

Step 4: Run claims request case and input the claims amount to 1400 and reach till the approval stage.

Step 5: You can check the pxFlow in the clipboard.

You can find all the open flows

Approval_Flow_1 -> pxApproval – > pxCascadingApproval -> pyCascadingGetApproval

Step 6: You can login with Claims Manager and approve the request.

Repeat for ClaimsDirector and approve the request.

You see the claims proceeded to next stage and from Audit, it assigned two levels for approval.

3. Cascading approval using decision matrix

Exact similar requirement like above – When the claims amount is less than $1000 then only claims manager should approve. If it is greater than $1000, then both claims manager and claims director should approve in cascading level.

Step 1: Update the approval step as cascading type.

Approval based on Authority matrix.

Step 2: Create a new pagelist – ApproversList that points to data-admin-Operator-ID class

Tip: Since the approvers are claimmanager and claimsdirector who are already part of pega operators, it will wise to reuse the operator ID class.

Step 3: Create a decision table to determine the approver list

Step 3.1 – Create a new decision table – DetermineApproversList

Step 3.2 – In the results tab – check evaluate all rows.

This will help to evaluate all rows and append to the approver list from the actions column

Step 3.3 –  Update the decision table

In the condition check if ClaimsAmount<=1000 and in the actions column, append the approverlist.pyUserIdentifier with the approver name.

Step 3.4: Test the decision table

Run and test with different values.

When claimsamount <= 1000

Only ApproverList(1) is appended with Claims Manager.

When ClaimsAmount > 1000,

Then you will see approverlist of 1 and 2 got appended.

Our decision table looks good.

Step 4: Update the approval step configuration

Add the decision table, page list and property.

Step 5: Save and create a new case.

Step 6: Check the clipboard

You don’t find the ApproverList in the pyworkpage?????

Pega considers it as temporary and pass the pagelist to pxCascadingApproval flow as parameter.

You can also see it from pxCascadingApproval flow.

In the pxFlow page, you can see the ApproverList got appended to pxCascadingApproval page.

Step 7: You can test the cascading approval flow on your own now.

Things to remember

1. For single approval type, you can either route the case to worklist and workqueue. You can also use business logic to determine the routing.

2. For cascading approval, you can either use reporting structure or authority matrix

3. In cascading reporting structure, you can use when rules to determine the approval level.

4. In cascading authority matrix, you can use decision table and populate the approvers list. The order of approverlist is key here.

5. If there are 3 approvers in a page and if first one rejects, then cascading flow ends and case goes to rejection.

  • case-management
Code Vault Curators

A technical team dedicated to empowering the Pega ecosystem with in-depth knowledge, guided by Premkumar Ganesan's vision.

Post navigation

Previous
Next

Pega Courses

Pega courses can be accessed at https://myknowacademy.com

Search through the blog

Tags

activity authentication background-processing case-management data-model declarative-processing email-processing file-processing pega-core-concepts pega-integration process reporting security system-administration user-interface validation

Categories

  • Code Vault

Recent posts

  • Service REST – Usage and Configurations in Pega
  • Queue processor – Usage and Configurations
  • Data Pages Usage & Configurations in Pega
  • Requestor types in Pega
  • Case Locking Mechanism in Pega

Related Articles

Code Vault

Case Locking Mechanism in Pega

December 10, 2024 Code Vault Curators

In this blog article, we will see in detail about locking mechanism in Pega. What is locking? Let’s take a simple example.  2 clerks working in a bank tried to update the same bank account for two different transactions. They both retrieved the bank account at the same time and started applying the transactions. Clerk […]

Code Vault

Approval flow in Pega – Usage and Understanding

December 10, 2024 Code Vault Curators

In this blog article, we will look into the approval process flow which we can implement using the case designer. This tutorial is demonstrated using Pega 8.7 personal edition. Most of the business organizations work in a hierarchical role and most of the processes may require certain approvals. From a very simple process like leave […]

Code Vault

Case Management – Understanding

December 10, 2024 Code Vault Curators

In this article, we will start with some basics about Case Management. Case Management is the primary power of Pega platform! Case defines a piece of work that can be executed with its own life cycle. Take any organization. At any of their core business they may have their own business processes. Consider an Insurance […]

Code Vault

Case Parallel Processing – Understanding

December 10, 2024 Code Vault Curators

In this blog article, we will understand different ways to configure the parallel processing case flows. Most of the business process will involve certain kind of parallelism in it case lifecycle at some point in the stage. For sure we will get into such a requirement when we want to use a Pega application case […]

About

MyKnowTech was born with a mission to bridge the gap between technical expertise and business needs. We are a boutique firm specializing in Pega solutions, delivering them with a personal touch. At the heart of our philosophy is a commitment to putting clients first.

Company
  • About
  • Leadership
  • Career
  • Contact
Resources
  • Blog
  • Services
  • Solutions
  • Insights

©  MyKnowTech B.V. All Rights Reserved.

  • Sitemap
  • Terms & Conditions
  • Privacy Policy