Skip to main content

Routing truck vendor and invoice cases to city manager

2 Tasks

45 mins

Pega Platform '23
Visible to: All users
Advanced Pega Platform '23 English

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

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

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
  • Easy to configure. Routes the assignment to the operator ID specified.
  • Difficult to maintain. If the operator ID is disabled or deactivated, the routing configuration has to be updated on the flow, in a different ruleset version.
  • Routing an assignment dynamically is not possible
To User Name
  • Assignments can be routed dynamically to an operator.
  • Does not fit the OOTB utilities for Notifications, assignments, and interested Notifications.
Work Party/Participant
  • Assignments can be routed dynamically to an operator.
  • Other fields on the work party can used wherever necessary. OOTB validation and sections corresponding to work parties can be reused.
 

2 Perform the following tasks

To complete the assignment, complete the following tasks.

  1. 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.
  2. 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.

Specific-User
  1. In the Route to list, select an option in the Custom options section.
  2. Specify the routing conditions by clicking Edit parameters and completing the fields in the Edit parameters window.
Business Logic

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.

Did you find this content helpful?

100% found this content useful

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