You can use a ticket in a flow to respond to business exceptions, errors, or events that you define. By moving a case to a specific point in a flow, you can ensure that additional processing occurs so that the case is not left in an incomplete state.
For example, you can activate a ticket to perform cancellation tasks and send correspondence to stakeholders when a user withdraws a case.
Click Designer Studio> Case Management > Work Management > Tickets to review the tickets that are available in your application and the rules that reference them.
Create a new ticket if there are no existing tickets that meet your use case.
In the Explorer panel, click Cases, and then click the case type that you want to open.
Set the ticket in the flow that defines your exception processing.
On the Life cycle tab, click a process in a stage and then click Open process.
On the Diagram tab of the Flow form, double-click the shape that is the entry point for your exception processing.
If you do not have exception processing defined, you can add shapes to the flow or create a new flow.
In the Advanced section, click Tickets.
Click + Add ticket.
In the Ticket name field, press the Down Arrow key and select the ticket that your application or a user activates at run time.
Optional: To change the label of the ticket in the flow diagram, enter a name in the Display name field.
Click Submit.
Click Save.
Activate the ticket in a flow that detects your business exception.
Return to the Life cycle tab of your case type.
Click a process in a stage and then click Open process.
You can set a ticket in one flow and raise it in another as long as both flows are in the same case.
On the Diagram tab of the Flow form, add the Utility shape to the flow diagram where the exception occurs.
Double-click the Utility shape and then configure it to call the @baseclass.SetTicket activity with the name of your ticket as an input parameter.
Click Submit.
Click Save.
Create a flow action that users perform when the exception occurs.
Ensure that the flow action calls the standard Work-.pyActionSetTicket activity during its post processing to activate the ticket.
Return to the Life cycle tab of your case type.
Click a process in a stage and then click Open process.
You can set a ticket in one flow and raise it in another as long as both flows are in the same case.
On the Diagram tab of the Flow form, double-click an Assignment shape to open the Assignment properties dialog box.
Tip: To make your flow action available for more than one assignment, associate it with a stage in the life cycle of the case type or the case type itself.
In the Advanced section, click Local actions.
Click + Add local action.
In the Local Action field, press the Down Arrow key and select the name of your flow action.
Click Submit.
Click Save.
Optional: To change the limits that prevent infinite loops in your flows, override the standard Pega-ProCom.MaxFlowEnteredCount and Pega-ProCom.MaxFlowLoopCount dynamic system settings in your application.
You can test your changes by creating and processing a case that meets the conditions that cause your business exception.
Previous |