Press "Enter" to skip to content

How to configure flows in Pega?

63

Introduction

  • Usually all applications have at least a single business process.
  • The business process use some sequence of events to complete the process.

Take Amazon as an example.

This is what happens, when we order a product in Amazon.

  • You can see a work flow here. Not only this organization, every organization business process can be represented in flows.

Now, Amazon needs a Pega sales application to manage this business process.

  • The ideal and best way to achieve this scenario is to use a case type.
  • In Pega 7, there are some beautiful changes in case designer. Introduction of stages, steps greatly reduce the developer works. Let’s discuss more about cases in separate lesson.

This business process can also be achieved using flows.

In this post, I am going to explain how to configure a new flow.

I will explain all the available shapes and different scenarios in the upcoming posts 🙂

“One may wonder, we just configure the flow shapes, then how the business process is handled?”

Pega Handles it with ease 🙂

  • All the available rules to support the flow shapes, routing, assignment are hidden within PegaRules application.
  • Pega builts everything and all we need to do is apply our business logic using shapes.
  • Pega does the rest by invoking the appropriate rules.

What is a Flow rule?

  • A flow rule models the business process using shapes and connectors.
  • Flow rule helps in achieving the sequence of events, every work item cross in their life cycle.

How do we configure a flow rule?

  • Flow rule is of process category.

Create a new flow rule.

You can specify the additional configuration options:

  1. Screen flow
  2. Process flow

What is a Screen flow?

  • Imagine you are filling an application form which contain n number of fields, you can represent these fields in series of screens (pages) for effective user experience.
  • To achieve this we can use a screen flow to present series of assignments to a single user. User can go back and forth in the screens.

What is a Process flow?

This can be a starter flow or a simple flow to support business process. Here users are able to route the tasks to other users, worklist, workbasket and all other functionalities.

What are the differences between Process flow and Screen flow?

Let us compare two scenarios:

Amazon sales process vs. filling online application form.

  • Who can work on the above two process?

Many people are involved in sales process – Amazon service, Seller, Courier while only a single person should be involved to fill out the online application form.

From this, you can differentiate process and screen flows in 2 ways:

1. Process flows can be routed to many people to work on. In Screen flows, only a single people can work.

2. In process flows, routing can be configured in assignment shapes, while in screen flows, routing is configured only in the start shape. (Yes, we need to decide before start filling an application form).

  • How the form should look for the two flows?

Harness determines the presentation of the form. In Amazon sales process, the forms provided to people will be different from one another, but online application form will be uniform in all the pages.

From this, you can differentiate process and screen flows in 2 ways:

3. You can have different harness for different forms in process flow, while you have a uniform harness for screen flow.

4. You can specify the harness (tab or tree) in the screen flow start shape, but you can’t do the same in process flow.

You can check the start shape configurations for screen flow.

We will see about ‘screen flow’ with example in the upcoming posts.

Other differences are,

5. In process flow, you can specify the flow actions in the connector shape, while in screen flow, you can specify the flow action in assignment shape.

6. You have the option to go back and forth in screen flow, but you can’t do the same with process flow.

7. Advanced shapes are not supported by Screen flows except split for each.

And the main difference is,

8. Screen flow cannot be a starter flow. They cannot create new work item.

Let us jump to the normal process flow we created before.

As soon as you create a flow 3 shapes are available – a start shape, an assignment shape and an end shape. You can extend and include new shape to support your business process.

In this post, I am going to explain only the configurations.

There are 4 main tabs:

  1. Diagram tab
  2. Design tab
  3. Process tab

Diagram tab

  • In this tab, you will specify the flow diagram.
  • You got a tool bar to add or modify the shapes and layout.

  • Draft button is provided to On/Off the draft functionality. If draft is On, then you can test the flow by adding shapes alone. No need to add the complete rules.
  • Once rules are ready, remember to draft Off to validate all the shapes.
  • + icon is used to add shapes within the flow rules. There are many shapes available in ‘flow rule’. It is a lengthy topic, I will take care of it in separate post.

Design tab

Category – Read only. This will be based on what template you selected at the time of creation.

Flow-wide local actions

Imagine you have a requirement, where you associate the interested people with the case. You can take this action throughout the case life cycle.

You can use the Flow-wide local actions.

Now, let us check the user portal.

Let me say about how this works. 🙂

Step 1: Use live UI for the other action button. Open the section and button properties.

Step 2: You will an On click action set – opening a menu.

Step 3: Open the navigation rule – pyWorkActionsPerform

What do you see here?

Pre-Activity – pyWorkActionsPopulatePerform, opens the flow rule and append all the flow actions to the PageList property – pyFlowActionsList.

This is how the Other actions button load the local and flow actions in the menu.

Let’s go back to flow rule.

You can modify the order in which these local actions should be present in the user form.

Display actions in alphabetical order? – sorts the local actions and displays in alphabetical order in other actions button.

Display these actions first? – You can also display the same order we provide in this field. The same order will be reflected in User portal.

Tools

  • You have few tools to publish this flow or to invoke this flow from external services.

Generate services – This is mainly used to invoke this flow from any Pega service rule.

Let’s test it.

  • Click on generate services. It will open up the Service wizard.

  • Complete the wizard. Each step will be explained in Integration posts.
  • After you complete the steps. Check the Service-SOAP rule.

You will see the Service using OOTB service activity – svcAddWorkObject to invoke the flow rule we created.

Process tab

Start settings

For a change, let’s see the section Pega used in Designer studio.

Process Commander internal flow – you can open the property form and check why it is used.

  • Yes, if checked this flow will not write history. Also note that this checkbox is visible for all flows.

‘pySystemFlow’ property contains the data for this checkbox.

This value is set, when you create a new flow & default will be false. You can check view xml from the Actions button and check this property value in the rule form.

Similarly, you can check for all the fields in the flow rule form. 🙂

Can be added to a work object – On checking this, the flow can be invoked on another work item through other actions button.

Note: This checkbox will not be visible, if there is already a case available in the flow applies to work class.

Create a new work object – On selecting this checkbox, this flow will create a new work item.

Then this flow can be called as starter flow.

pyCanCreateWorkObject – Note this property. We will see its usage later in this lesson.

This checkbox will not be visible, if there is already a case available in the Applies to class.

Document as Starting process – This checkbox is not that much important. When checked, this flow can be added in the application documentation as starting process.

Case creation settings

This block is visible only when you select, ‘Create a new case’ from the start settings.

Temporary Object – 

  • On selecting this checkbox, work item is created but with no ID. This work item will not be saved to Database.

I know, what you are thinking 🙂 Then, “why do we need this?”

Imagine, you are applying for an interview. A case is initially created for you as I-1, but sorry, unfortunately your profile is screened now. They have to resolve the case as cancelled.

If the organization don’t want to keep record of these, then they can create a temporary object initially.

Once you are qualified from the screening, they can create a new case ID and work on the Interview process.

Remember, you can persist any temporary object, anytime in the flow using it as an advanced shape ‘Persist a case’.

Skip create harness 

Imagine the same example above, the organization needs you to fill in a form before starting the interview process. Case ID will be created only after submitting the form.

If you check this checkbox, then no create harness will be shown. A case ID will be created.

Let’s uncheck this and test.

Run the flow.

You will see that the new harness and the case ID are not created yet. You can try checking and testing from your end.

The Harness field, I marked in the picture is responsible to determine which harness should be displayed in the case creation.

Look for an assignment to perform – Make sure you check this checkbox. Default selected.

On checking this, Pega invokes a search to identify any open assignments for the same case in the work list. If yes, then the assignment will be presented to the User.

Also consider an assignment is workbasket – This is visible only when look for an assignment to perform is checked.

Here, Pega extends the search to the user available workbaskets.

If an assignment is not being performed?

You can either show the harness or close the case.

If you select show harness, then specify a harness – Usually Confirm harness.

Let us test by closing the case when no assignment is being performed.

Still you will get the confirmation screen 😛

The reason is, this field applies only when flow started from create button and no assignment is found.

This same field is available in the flow action rule form.

Always this file takes precedence.

So, if you want to close the case/show harness after a last assignment screen, then use this setting.

Data Transform You can specify a default data transform here.

If you leave blank, then default pyDefault will be called.

Work parties Specify the work party to associate with the case.

For more details on ‘workparties’, kindly look at this post (http://myknowpega.com/2017/05/13/workparties/)

Supporting Process Settings

What is a supporting process?

  • Supporting process is specified in case type.
  • Supporting process appears in the Add work – Other actions menu. You can start a support case while working on the main case.

Look for an assignment to perform – Same as explained above.

Also consider an assignment is workbasket – Same as explained above.

  • This field holds the flow level SLA.
  • You can either set here or add in pyDefault Data Transform.

For more details on ‘SLA’, please see the post (http://myknowpega.com/2017/05/17/service-level-agreement/).

Start Conditions

You can specify a when rule to authorize creating a new flow.

Let’s test. I used never condition. Now, run the flow.

On clicking create button, you will get the error shown below.

Security

You can also restrict creating the flow using authorization rule – Privilege.

The users should contain the above privilege to start the flow. If many used, then he/she should contain at least one privilege to start the flow.

For more information on ‘privilege’ visit my post (http://myknowpega.com/2017/05/19/access-deny-privilege/)

No more… End of a long innings. See you soon in Flows part -2 🙂

 

 

  1. Hey Prem,

    First of all, this is great work. Amazing collection of tutorials. While going through the post I stumbled across a fact saying that screen flows cannot used to create new work items. Has that been tried and tested?

    • Premkumar G Premkumar G

      Thanks for your reply. Yes Screen flows stand alone cannot create a work item. You will never see an option to create a work item. But Screen flows can used in any starter flows

  2. Saleem Saleem

    Thanks for sharing.. Great work

    • Premkumar G Premkumar G

      Thank you so much for your appreciation, Saleem. Please subscribe and stay tuned for more posts.

  3. Saleem Saleem

    One more difference is usage of Ticket and SLA on assignment in screen flow is not there..!!

    • Premkumar G Premkumar G

      Tickts – We can raise a ticket inside a screen flow, but we cannot catch the ticket. ( Cannot be assigned to a shape)
      SLA – We can still assign a flow level SLA.

      Imagine a scenario,
      you have open the screen flow and without completing to left for that day. I can have a flow level SLA with 12 hours time period.
      I can use escalation activity to raise a ticket, that is tagged in parent flow. I can end this screen flow using over-all SLA and ticket

    • ramachandra ramachandra

      So where do we configure SLA in screen flow

  4. sandeep mahajan sandeep mahajan

    This is very informative , I know lot of people will find it very useful. You are doing great job.

    • Premkumar G Premkumar G

      Thank you so much for your appreciation, Sandeep. Please subscribe and stay tuned for more posts.

  5. Ashok Ashok

    What’s the setting for a screen flow to get back to where they last were ?? Any idea or is that by default ??

    • Premkumar G Premkumar G

      Yes. Whenever you add a screenflow, default you will get Back & Next button.
      Please look into ‘pyCaseActionAreabuttons’ oOTB section which contain all the standard button configuration in perform harness mode.
      You can also control in the assignment shape as whether only going back is allowed. Please explore the same too 🙂

  6. Let’s say, I run a starter flow explicitly for testing purpose. Will that create a new work object?

    • Premkumar G Premkumar G

      Yes, Datum it will 😊. We do it in development environment, so no issues. Go on creating as many as you can 😁

  7. Harsha Harsha

    Hi Prem,
    Great work. I have a request, Can I have video format of this class, so that it be more useful.

    • Premkumar G Premkumar G

      Thanks Harsha. I will plan it soon

  8. kiran kiran

    Hi Prem,

    Great Read.

    Why don’t you write a blog where you can share your experience on how you started learning Pega. Most importantly i want to know how one can master in writing activities. I know experience brings the best in you but just a basic thought of yours which can help in mastering activities. If you think you can answer by just replying even that would be great.

    • Premkumar G Premkumar G

      Hi Kiran, I will find a day to share my experience as a blog post 🙂

      All the business process involves data. Activity helps in processing data. It involves several methods to achieve that.
      You can break any business logic to activity steps.

      Don’t think writing activity is a complex one. It is very simple. We just make use of those activity methods and build our logic.

      Don’t worry, I have planned to make a post on activity methods soon 🙂

  9. sai sai

    when Creating Flow why we are using Standrad template option ?

    • Premkumar G Premkumar G

      Hi Sai,

      As we know there are two types of flow
      A) standard process flow
      B) screen flow

      When standard process flow is selected, we can create a simple flow or a starter flow ( creates work item )

  10. Sowmya Sowmya

    Hi Prem,

    Great Work. I have a request can you please share some useful stuff on “Circumstance” Concept.??

    • Premkumar G Premkumar G

      Thank you Sowmya 🙂 I will try to make a post on circumstance soon. I added it in my backlog 🙂

  11. Upendra Upendra

    can u explain straight throw flow? How it works without human input? Explain internal mechnisam?

    • Premkumar G Premkumar G

      Hi Upendra,
      Whenever you start a flow, it stops whenever it come across any assignment (needs human input). Say for example, your flow have only 3 shapes – start, end & a send email utility shape.
      Now this flow can be considered as straight throw flow. It can work without human input. 🙂

  12. Thejaswi Thejaswi

    Hi,

    The document was very helpful.can you tell about entry point in screen flow

    • Premkumar G Premkumar G

      Hi Thejaswi,

      Entry point in screen flow refers to enable navigation link. You can configure that in assignment shapes.
      When enabled you can see a breadcrumb at the top. Usually we use it to jump between screens.

      You need to enable and disable the link and check the difference 🙂

  13. Ramachandra Ramachandra

    Hi Prem,
    Can you make a topic on HARNESS…

    • Premkumar G Premkumar G

      Hi Ramachandra,
      Yes, I will try to post it soon. Stay tuned. 🙂

  14. suma suma

    Hi Prem,

    Really great work sir..

    Im also waiting to see your post on your experience on Pega..
    It would be great if you can share any videos as well for each topic anyway images also helpful.

    Please share a post on Parameters in activities and DT..
    also on Harness topic

    Thanks!

    • Premkumar G Premkumar G

      Hi Suma,

      Thank you so much.

      Oh. I’ll try to post about my experience soon. Yeah, some people also have suggested me to use videos. Since it has been some weeks only, I’m thinking about posting videos after sometime. But definitely, I’ll post some videos.

      Since many of you have requested a post on Harness, Activities and all, you expect those topics soon. 🙂

      You are most welcome, Suma. 🙂

  15. ravi ravi

    Great work Prem. Wonderful tutorial for beginners.Can you please explain more on “Create a New Work Object check box will not be visible, if there is already a case available in the applies to class

    • Premkumar G Premkumar G

      Hi ravi,
      It means, Pega wants to have a single starter flow per concrete class.
      In the Flow rule – process tab the checkbox is read only based on the condition when rule – ‘pzCasetypeHasStartingFlows’

      If you have create a starter flow before, then the checkbox will always be ready only:)

  16. Santosh Kumar Mohapatra Santosh Kumar Mohapatra

    Thanks a lot for these many information.

    • Premkumar G Premkumar G

      You are most welcome, Santosh. 🙂

  17. Pradeep Pradeep

    Hi Prem,

    Before creating case, Can we apply Data Transform or execute Activity. If yes, where we can do this?

    • Premkumar G Premkumar G

      Yes. You can use both data transform and activity before executing the case.

      data transform – pyDefault. You can use this data transform, specialize in your work class and update any properties or call your data transform.
      Activity – NewDefaults. You can extend this actvity in your work class and do your business logic. You can also try ‘ValidateNew’ activity.
      Just open the tracer and create a sample case. You find these rule instances.

      I have used all the above rules in my previous projects 🙂

  18. Pradeep Pradeep

    Thanks for the info Prem, Great work.!!

    • Premkumar G Premkumar G

      You are most welcome, Pradeep. 🙂
      Thank you for your appreciation. 🙂

  19. Raghu Raghu

    Thanks Prem,good explanation.have one query.
    Suppose there is main flow which has two assignments and screen flow call and in the screen flow there are three assignments, totally two assignments in main flow and three in screen flow. when the flow gets executed , how many entry of records gets stored in pc_work and pc_assigment table.

  20. raghu raghu

    Thanks for info, have one query related to flows..
    There is a main flow which has two assignments and screen flow call and in the screen flow there are 3 assignments.Total assignments—-main flow-2 and screen flow assignments-3,So when flow gets executed how many entry’s of records gets saved in pc_work and pc_assignment tables.

  21. Nalini Nalini

    Hi prem,
    It was useful information, Thanks a lot.

    1. In process flow or screen flow we have entry point, in assignment level. Can you please tell us the use of entry point especially in process flow.
    2. Entry point is available at decision shape, connector level, need to know the reason.

  22. Sairam Sairam

    Hi Prem,
    Excellent work, Great job

    • Premkumar G Premkumar G

      Hi Sairam,

      Thank you so much for your appreciation. 🙂

      Regards,
      Premkumar G

  23. ramesh ramesh

    Hi,This is rameshKoduri from Hyderabad

  24. vinod vinod

    Hi Prem,
    I have a scenario, where an assignment shape will have two connectors with likelihood as same value(100% for both), which assignmnet will be executed first what will be the logic?

  25. vinod vinod

    Hi Prem,
    I have a scenario, where an assignment shape will have two connectors with likelihood as same value(100% for both), which assignmnet will be executed first what will be the logic?

    Thanks in advance

  26. Gaurav Gaurav

    Hi Prem,
    Thanks for the nice explanations.Please update some articles on the shape of flows both for standard shape and advanced shape.

  27. Raja Raja

    Hi prem,

    Great Stuff Thanks a lot
    Can we use flow action in Harness?

    Thank u

  28. Ravi Ravi

    Many thanks for sharing. Really awesome….

    • Premkumar G Premkumar G

      You are most welcome, Ravi. 🙂
      Thank you. 🙂

  29. Acharya Acharya

    Hi Prem, I have a requirement .
    i have to gather a customer info in screen flow with SLA after validating gathered data i have create a work object and further process should go on..
    1) how to set SLA for screebflow
    2) how to create wb in the middle of Flow

    Thanks in Advance

  30. Moumita Dey Moumita Dey

    Hi Prem,

    Thanks for sharing your knowledge with us. 🙂 It is really worth to read these articles through your blog. 🙂 I have one question regarding Flow Action.

    Can you please tell me, How to provide a flow action to be available for all the Assignments for one case?

    Thanks & Regards,
    Moumita

  31. Anusha Anusha

    Hi,

    Good Example explanation.Can i know whether Flow creation should be done in Work class only?

  32. Moumita Moumita

    Hi,

    I read that screen flow can call split-for-each shape, however, if a screen flow only represents one assignment then split-for-each shape will create multiple assignment , whats the mechanism behind that? Kindly explain

  33. rekha rekha

    Hi PremKumar,

    You said the main difference in flow types–screen flow cannot be a starter flow.
    But now any updates are there? All are saying–Yes, screen flow can be a starter flow by using OOTB activity. Is this correct? please reply me.
    Thanking u..

  34. Surya Surya

    hi prem.. i have a child case with wait shape depending on parent case’s status.. how can I achieve this?

  35. Dharma Dharma

    when will a flow be assigned to broken process to repair flow configuration

  36. Haribabu Avula Haribabu Avula

    Hi Prem,

    Very useful information for the beginners.Please add the post regarding issues or problems while creating Service-Rest and Connect-Rest.

    • Premkumar G Premkumar G

      Hello Haribabu Avula,

      Thank you so much. Yeah I’ll post about those issues and problems as a separate post soon. Stay tuned. 🙂

  37. Triveni Triveni

    Awesome explanation about process flows

  38. Ravi Ravi

    Hi Prem,

    As per my knowledge, Yes !! Screen flow can be a starter flow.

    In the flow, we can call a utility shape and in that there is a “NewFromFlow” method which will ask you to give ‘Flow Name’ and ‘Flow Class’ as parameters.

    So, we will give the parameters as Screen Flow name in the Flow name and
    Screen flow class name in the flow class name.

    O/P : when we execute that flow , it will invokes the utility that initiates the screen flow.
    Please correct if i am wrong.

  39. Ganapathy Ganapathy

    Hi Prem,

    First of all, my heartfelt appreciations for your great work in sharing knowledge of Pega. The blogs are really informative and helps to understand concepts easily.
    And I have a doubt. I have a flow rule A in class TVS-FW-Auto-Work and enabled “Create a New work Object”. I have created another flow rule B in the same class which I am calling from A as subflow. But in this flow rule B, I can able to select “Create a New work Object” and not as read only. I am using Pega 7.2. Please clarify my doubt.

    • Premkumar G Premkumar G

      Hi Ganapthy,
      It is a valid question. pega is using ‘pzCasetypeHasStartingFlows’ when rule to decide if the casetype has a starting flows. If this when rule satisfies, then your ‘Create a new work object’ will become read only.

      I believe in your case, you dont use case types 🙂

  40. Arun Arun

    Hi Prem,

    Just amazing… 🙂

    Will there be a detailed post on configuring Screen flow ?

Leave a Reply

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

error: Content is protected !!