Handling flow changes for cases in flight
5 Tasks
30 mins
Scenario
Front Stage's Booking application has been in production for a while and the number of event approval requests has increased. Front Stage hired three executive officers to accommodate the increase. The First executive officer is authorized to review and approve requests for fewer than 5,000 attendees. The second executive officers approve requests for attendees between 5,000 and 10,000. The CEO approves requests for events with more than 10,000 attendees.
Front Stage wants any existing cases awaiting executive approval to be distributed according to the new requirement shortly after the new code is released into production.
The following table provides the credentials you need to complete the exercise.
Role | User name | Password |
---|---|---|
Admin | admin@booking | rules |
Implement a change to satisfy the new requirement. Elaborate on solutions for identifying cases in flight affected by the new configuration, and reposition them to the appropriate location in the flow. Set up test cases to verify that the change works for cases in flight.
Detailed Tasks
1 Identify design options
If the number of attendees for an event is less than 5,000, then the case is routed to the first executive officer for approval. If the number of attendees is between 5,000 and 10,000, then the event case is routed to second the executive officer for approval. If the number of attendees is more than 10,000, the event case is routed to the CEO user.
Option 1: Applying single approval flow type shapes
Add three approval flow shapes and fork the shape with a single-level approval flow type for each of the flow shapes.
Create three when rules IsFirstExecutiveApproval, IsSecondExecutiveApproval, and IsCEOApprovalRequired. Use the rules in the fork shape
In the first approval shape, the route to the specific user ExecutiveOfficer1@Booking if attendees are fewer than 5,000.
In the second approval shape, the route to the specific user ExecutiveOfficer2@Booking if attendees are between 5,000 and 10,000.
If the attendees are greater than 10,000, the route to the CEO.
It is required to reposition existing cases to the appropriate location in the flow using the below activity. This is a one-time activity that is part of the production ruleset and is executed manually after the latest flow rule is deployed into a production environment.
Maintenace activity helps identify in-flight cases that are positioned at the Executive Review flow step. The activity restarts the flow for those cases so that the cases are routed according to the new logic.
In this activity, leverage the D_Worklist out-of-the-box (OOTB) data page, which takes OperatorID as a parameter. By passing the CEO@Booking operator ID to this data page returns any existing cases that are awaiting executive approval. Iterate on the data page and open each awaiting case by using Obj-Open-byHandle. Call the pxRestartStage OOTB activity, and perform the Obj-Save method and call CommitWithErrorHandling OOTB activity.
Option 2: Update flow rules and leave old wait points (assignments, subprocess)
Drag old shapes off to one side and delete incoming connectors to the shapes. Keep outing connectors from the shapes intact. New work objects never reach the outdated shapes, but the work objects at older assignments still follow the same path.
You can later run a report that checks whether the old assignments are no longer in use. If so, you can then remove the flow wait points.
Option 3: Circumstance flow based on a date property
Create circumstancing flow rules based on date property rather than property. On the old flow rules, clear the Creates a new work object check box and on the new flow rules, select the Creates a new work object check box. New work objects are based only on the new flows.
You can clean old rules once you are certain that there are no inflight cases running with old flows.
2 Evaluate design options
Design | Pros | Cons |
---|---|---|
Three Single Approval flow type shapes |
|
|
Update flow rules and leave old wait points |
|
|
Circumstance flow based on a date property |
|
|
3 Recommend the best design option
Use Option 1, three Single Approval flow shapes, to route the case to appropriate executives based on the number of attendees.
4 Review solution details
To review the implemented solution, switch the application to Booking InFlight when you are logged in with the Admin@Booking operator.
5 Complete the challenge
To complete the assignment, accomplish the following tasks.
- Create test cases with 3000, 6000, and 11,000 attendees and advance the cases to the executive approval stage.
- Log in as Admin@Booking.
- Create a new Executives@FSG workgroup and set the Manager IDs to CEO@FSG.
- Associate the new Executives@FSG workgroup with a new Executive@FSG work queue.
Field Setting Short description Executive Officer 1 Operator ID ExecutiveOfficer1@Booking - Click Create and open to create the operator ID.
- On the Profile tab, change the Full Name to Executive Officer 1 and the Email to [email protected].
- On the Work tab, add Workgroup to Executives@FSG.
- Save the new ExecutiveOfficer1@Booking operator ID.
- Repeat steps 4-8 for ExecutiveOffice2.
Available in the following mission:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?