You are on page 1of 22

 

Pega Knowledge Sharing Home Blog Posts My books About Contact Privacy Policy
A drop from the ocean

Tickets in Pega
Introduction In this post, we will see how we can configure tickets in Pega and its use
 cases. I will start with a story!! Once we friends went to an… 
Read more

Search … Search

Tickets in Pega 2
BOOK BY YOUR MYKNOWPEGA ADMIN
Published November 15, 2019 by Premkumar G

Introduction

In this post, we will see how we can configure tickets in Pega and its use cases.

I will start with a story!! Once we friends went to an amusement park. That was a holiday and so
It was quite busy out there and we were standing in a queue for more than an hour. We saw few Black heart:
Time heals or...
people evade the long queue and went straight inside. Totally annoyed we checked and found
that they booked tickets online. So, if you book ticket online, you can take a shortcut and jump
Shop now
straight inside

I will give you a developer situation . When there is a critical production ticket raised, what you
will do?! You put all your works down and jump straight to the ticket right?!
What is ticket in Pega?
SUBSCRIBE TO BLOG VIA EMAIL
Ticket can be defined as an entry point in flow in certain situations.
Join 3,102 other subscribers.

We know that the flow processing always starts from the start shape and follows the path of
connectors. But in some situation, you need to skip few steps and connectors and jump direct to Email Address

a certain step (shape).

Subscribe
The situation can be an error, exception case or any event (like child cases resolved,
withdrawn etc)

MAKE YOUR DREAM TRAVEL WITHOUT


OVERSPENDING ;)

Business scenario

Say XYZ is a banking organization with a main central branch and many local bank branches.
They provide loans to customers and the central bank uses a Pega application to service the
customer who falls into arrear.

I am going to break the business requirement into four use cases. CATEGORIES

Application Structure (3)


The central bank uses the Pega application to treat the customer who fell into arrear by
creating an arrear case. Authentication (8)
The central bank can treat the customers only after 60 day, so it should wait. Meanwhile a
Authorization (3)
parallel process – local bank permission should be invoked to check if the customer can
Case Management (5)
be treated from the local bank. Data model (7)
If the central bank doesn’t hear from local bank for 60 days, then we should automatically Declarative rules (4)
end the local bank permission flow and start treating the customer in central bank.
Similarly, if the local bank says it can treat the customer, then end the current process in Integration (22)

the central bank. Organizational rules (1)

Process (8)
Just like how team lead delegates the work to their team members. Team lead only involve, if the
tasks cannot be completed their team members within the deadline. Reporting (4)

System Administration (7)


Tip: whenever you hear any requirement, try to decimate it as small as possible. This can
help you speeding up the development process I guarantee it works! Technical (5)

Uncategorized (2)
Let’s start with implementing the first use case.
User Interface (6)

First use case – The central bank uses the Pega application to treat the customer who fell into
arrear by creating an arrear case.

For now, I am customizing the starter flow rule on Arrear class for testing purpose, so that I can
create case and test straight away. The simple arrear case contains a simple assignment shape.

Black heart:
Time heals or...

Shop now

Black heart:
Time heals or...

Shop now
Second case case – The central bank can treat the customers only after 60 day, so it should wait.
Meanwhile a parallel process – local bank permission should be invoked to check if the customer
can be treated from the local bank.

Step 1: Create a new flow rule for local bank permission. Just keep it very simple with a single
assignment.

Step 2: Include the newly created Local bank permission flow as a spin off subprocess to the
starter flow (parallel flow processing)
Make sure you check the spinoff flow for parallel processing.
Step 3: Include the 60 days wait shape after the spinoff parallel process.

Before implementing the third use case, test the steps by creating a new arrear case

Step 1: Run the starter flow and create a new case.


You will see a new case created and waits in the wait shape for 60 days.

In the open assignment you see the parallel process ‘LocalBankPermission’ invoked.

Step 2: Open the clipboard to check the pyWorkPage.pxFlow page group property.

You see there are 3 pagegroups on LocalBankPermission, pzInternalCaseFlow and pyStartCase.

pyStartCase is the main flow and LocalBankPermission is the parallel flow right.
One thing to note is pxFlow page group will be created for all the open flow rules and gets
removed automatically when the flow ends!

Let’s get back to the third use case.

Third use case – If the central bank doesn’t hear from local bank for 60 days, then we should
automatically end the local bank permission flow and start treating the customer in central bank.

How to end the local bank permission flow automatically?

The answer is by raising the ticket.

How to create a new ticket?

Ticket rule belongs to Process category

Step 1: Create a new ticket rule Records -> Process -> Ticket -> Create new
Step 2: There is no configuration in the ticket rule . Only the name is enough.

Now we created a new ticket.

Where can we refer the ticket?

Tickets can be referenced in almost all of the shapes in the flow rule. By referring the ticket in the
flow shape, it provides an entry point for a jump from any other point.
In our use case, we need to end the local bank permission flow after 60 days waiting. So you
know in which shape you need to refer the ticket – Yeah its end shape, so that you can end the
flow

Double on the end shape in the local bank permission flow.

Specify the newly created ticket name – EndPermission

You will see the ticket indicator in the end shape. So you have successfully specified the ticket.
Note: You can always specify more than one ticket in a single flow shape

The next step is you need to conditionally raise the ticket ( JUMP statement)

How to raise a ticket?

There are two ways to raise a ticket.

a) Obj-Set-Tickets method – You can use the method in the activity step to raise a ticket. The
method accepts the ticket name as the parameter.
b) Pega api activity – SetTicket – This accepts ticket name as the parameter.

In flow rule, we can use the utility shape and call the activity – SetTicket by passing the ticket
name as the parameter – EndPermission.

Add a new utility shape after the wait shape. So after waiting for 60 days in the wait shape, flow
automatically moves to the next utility shape and the ticket gets raised.
Save the flow rule.

At which context do we need to raise a ticket?

Usually we raise a ticket at the case context. Primarily on the work page (pyWorkPage or
pyWorkCover)
So technically when a ticket is raised for a case, primarily on the case workpage as a step page,
Pega engine checks if the ticket is specified on any of the opened flows in the case using the page
group

pyWorkPage.pxFlow or pyWorkCover.pxFlow. If it specified, then it moves the flow rule to the


specified ticket shape.

Now save both the flows.

Time to test the ticket raising

Step 1: Create a new arrear case by running the pyStartCase.

The case stays in the wait shape.

Step 2: Start the tracer and click continue.

Note: You need to allow the continue option in the wait shape
In the tracer, you will the activity – FlowTicketEvaluate is responsible to evaluate the raised ticket
in all the open flows in the case.

Step 3: Open the activity – FlowTicketEvaluate. You will see the java step performing the
evaluation on the opened flows.
Step 4: Now check the clipboard of the case. You will see the LocalBankPermission flow has
because eof the raised ticket and hence it is automatically removed from the pxFlow page group.

Fourth use case – Similarly, if the local bank says it can treat the customer, then end the current
arrear process in the central bank.
This can also be implemented using setting ticket and raising ticket.

Just follow the steps

a) Create a new ticket rule – EndArrearProcess

b) Set the ticket in the main flow end shape

c) Raise the ticket in the local bank permission flow.

You can test this on your own.


Important note: Ticket is not restricted that you can jump only forward! You can also jump
backward.

What are the standard tickets used by Pega?

There are few standard tickets, the engine automatically raises on certain events or exceptions
like resolve, withdraw etc

1. Status-Resolved – Whenever a case is resolved, pega raises this ticket.


2. Withdraw – Whenever a case is withdrawn
3. AllCoveredResolved – This ticket is raised when all the child cases are resolved.

So, using the above tickets, you can jump to any shape in the flow by the specifying the standard
tickets in the right shapes, based on the events

Remember, Pega automatically raises these tickets! Do not worry about raising this manually!

Things to remember

Ticket is an exact implementation of JUMP or GOTO statements.


You can jump to any shape in the flow rule, either forward or backward.
Almost all the shapes in the flow supports associating tickets.
Tickets can be raised by api activity – SetTicket or by the activity method – Obj-Set-Tickets
Once a ticket is raised, pega engines checks if the ticket is associated with any of the open
flow shapes within the case. If yes, the flow jumps to the ticket shape.

With the improvements in case management, the usage of tickets is limited to a greater extend.

Ticket usage can now be replaced with change stage utilities in the case management.

Hope you enjoy this post on tickets. See you all in my next post. Take care!!
Share this:

Share
Premkumar G

Published in Process

Tickets

Bhagiradha  Reply

Well Explained with Real Time Example,Expecting more interesting topics from you Prem

Prolay Saha  Reply

Awesome explanation Prem..!!!!!

can you please make a post on excel uploading and fetching data from that uploaded excel file..
Its my humble request to you.
Leave a Reply

Your email address will not be published. Required fields are marked *

Comment

Name*

Jane Doe

Email*

name@email.com

Website

http://google.com

Post Comment

Notify me of follow-up comments by email.

Notify me of new posts by email.


Pega Knowledge Sharing A drop from the ocean Startup Blog by Compete Themes.

PDFmyURL.com - convert URLs, web pages or even full websites to PDF online. Easy API for developers!

You might also like