Skip to main content

Designing Get Next Work

4 Tasks

40 mins

Visible to: All users
Advanced Pega Platform 8.8 English

Scenario

Front Stage (FSG) wants its quality control users to check the quality and quantity of necessary items like tents, disposable raincoats, etc. before they approve, it requires two levels of approvals from QualityControl specialists in Weather Prep case with a restriction that the same specialist cannot approve the second level on the same case. 

The application should be able to assign work according to the following criteria: 

  • The Quality control user can either be a first level or second level approver 

  • The same case assignment should not be fetched for the second level approval for the same QualityControl user

  • Select the oldest assignment 

Design and configure the Get Next Work solution to satisfy the requirements. Consider alternatives and compare the pros and cons of each to select the best approach.

Facilities coordinators have the following roles, as do members of the same work group.

Department Role User name

Quality Control

Quality Control Coordinator 

QualityControl1@Booking

Quality Control

Quality Control Coordinator 

QualityControl2@Booking

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Detailed Tasks

1 Identify design options

Option 1: Circumstance Assign-Workbasket GetNextWork listview  

Assign-WorkBasket GetNextWork list view rule is circumstanced by property value OperatorID.pyWorkGroup = "QC@FSG". For quality control users, the circumstanced version of GetNextWork will be picked, and the base version of GetNextWork will be picked for other application users. Additional logic can be applied in the circumstanced version of GetNextWork to restrict the same quality control user approving the same case in the second approval assignment and sort on pxCreateDateTime with ascending.

Option 2: Add a custom button that runs the Open Assignment action 

Add a custom button to the pyCaseManagerShortcuts(Dashboard-Widget) section and configure the Open Assignment action. This action requires a parameter for opening the assignment. A custom activity is used to populate this key by using the report definition and GetNextWorkCriteria decision tree. This report definition has a filter criteria based on business requirements.   

Option 3: Override Assign-WorkBasket GetNextWork related rules  

Apply a Save as to the existing GetNextWork list view rule in Assign-Workbasket class with the filter criteria per the business requirements. Override the Assign- findAssignmentInWorkbasket activity to execute the new list view rule for the quality control workgroup users. Otherwise, execute the existing list view rule.

2 Evaluate design options

Design Pros Cons
Circumstance Assign-Workbasket GetNextWork listview
  • Reflects existing Assign-Workbasket GetNextWork implementation

  • No changes in UI rules  

  • Easy to maintain 

  • Listview is deprecated and a guardrail warning is displayed
Add a custom button that runs the Open Assignment action
  • Solution not tightly coupled to Pega rules such as Assign-Workbasket GetNextWork ListView  
  • Need to add redundant or custom error handling

  • Next assignment needs to be hidden for QualityCoordinators  

  • Changes in UI rules

Override Assign-WorkBasket GetNextWork related rules 
  • New rules are to be created and findAssignmentInWorkbasket activity needs to be modified
  • Affects the Assign-Workbasket GetNextWork list view behavior for every user

3 Recommend the best design option

Option 1 is simple to implement and maintain. This option uses the circumstance by the property for Assign-Workbasket.GetNextWork list view rule. This option1 reflects existing GetNextWork functionality and does not affect other facility coordinators when using GetNextWork.

4 Review solution details

To review the implemented solution, switch the application to Booking GetNextWork when you are logged in with Admin@Booking operator.

GetNextWork ListView
Assign-Workbasket.CanPerform
Quality control GNW


Available in the following mission:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy 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