Routing truck vendor and invoice cases to city manager
2 Tasks
45 mins
Scenario
After the vendor enrollment request is approved, the city manager must review the truck and freight details. The Truck Service Approval case must be routed to the city manager for review. Once the delivery is complete, an invoice case is created and the accountant has to review it manually before sending it for approval to the city manager. The invoice case has to be routed to the accountant for review.
The following table provides the credentials you need to complete the challenge:
Role | User name | Password |
---|---|---|
Admin | admin@deliveryservice | rules |
Detailed Tasks
1 Identify design options
The assignments can be routed to the city manager or the accountant by assigning them to their worklist. This can be achieved by routing the assignment using the Specific User routing. There are three options when routing to a specific user: to the user name, to a reference field, or to a participant (work party).
The To User Name routing requires the operator to be identified from the list of available operators. Routing by using a reference field or by using a participant helps dynamically route the assignments. For routing using a reference field, a property must be specified that holds the operator ID of a user. The assignment is routed to this user during runtime. Similarly, routing using a work party routes the assignment to the operator specified on the work party.
Design approach | Pros | Cons |
---|---|---|
Specific User |
|
|
To User Name |
|
|
Work Party/Participant |
|
2 Perform the following tasks
To complete the assignment, complete the following tasks.
- In the ReviewFreightService_Flow of the TruckServiceApproval case, add the city manager as a work party and route the case to this party on the FreightService assignment. The work party can be added by using the PartyAddOperator or AddWorkObjectParty activity. The City Manager work party needs to be defined as a work party participant on the Truck Service Approval case.
- When the delivery request is complete, the invoice case must be routed to the accountant. On the InvoicePayment_Flow of the Truck Request case, on the Create Case smart shape, Accountant can be added as a work party in the Create Case data transform. Set the party class, party model, and call the AddWorkObjectParty activity to add the accountant as a work party. The Verify Invoice assignment can now be routed to the accountant using the work party added.
Other routing options
Routing using Business Logic
In App studio, you can now route the Assignment based on availability and skill set, or based on availability, skill set, and workload.
Select an assignment and configure the routing option. In the Route to drop-down list, select Use business logic.
- In the Route to list, select an option in the Custom options section.
- Specify the routing conditions by clicking Edit parameters and completing the fields in the window.
You can implement the custom routing options by using the ToSkilledGroup and ToLevelledGroup custom options.
Routing based on availability and skill sends the assignment to the selected operator within a specific team. This operator is available between the time the assignment starts and when it is due, and has the minimum skill proficiencies to complete the assignment
Routing based on availability, skill, and workload sends the assignment to an operator within a specific team who has the least urgent total worklist, based on a computed score.
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?