Press "Enter" to skip to content

Split Join, Split for Each & SpinOff tutorial in Pega

17

It is highly recommended to see the ‘configuration’ post first before proceeding 🙂

All the testing scenarios are explained here:

How to configure Split Join, Split for Each & Spin Off in flow rule?

Split-Join

What are the pre-requisite to test split join?

  1. Create any new implementation application or you can use an existing one.

I am using Amazon sales application.

  1. Create a new starter flow.

Note: Starter flow – ‘Create a new work object’ should be checked in process tab.

We will update the shape later.

   3. Create two test operator IDs for approval process.

a) Operations manager

b) Seller manager

  4. Create 2 different approval process flow for the two operators.

a) Operations approval

b) Seller approval

Operations Approval:

  • Use approve flow action.
  • Double click on the assignment properties and route it to Operations manager.

Please do the same for seller approval and route to seller manager.

Make sure their access group points to Amazon application (manager/admin any access group is okay).

Let us test Split Join scenario.

Step 1: Open the flow we created. Replace the assignment shape with Split-Join shape.

Step 2: Double click on the split join shape and open the properties panel.

Choose join condition – All.

Add both the OperationsApproval and SellerApproval one by one.

Now you have configured a split join shape with two approval process flows.

Step 3: Run the flow.

You can see two assignments are created for both the managers.

Note the Case ID : S-216

You can also see that the primary flow is halted and waiting for the two approval process.

Step 4: Login as OperationsManager and approve the case.

Step 5: Login as seller manager and approve the same.

You can see below, a new assignment is created under my name, the create operator. It means control returned to primary flow 🙂

Step 6: Switch to the portal, where you ran the flow (my Login). Check the user worklist. The flow will be moved to next assignment to dispatch product.

Step 7: Click on the ‘Where am I‘ link to identify in which shape you are in now.

Note: You can update the Join condition in Split Join shape to ‘Any/Some’ to return to primary flow based on the conditions. You can test those scenarios too.

Split for Each

What are the prerequisites to test this split for each?

  1. Create any new implementation application or you can use an existing one.

We will use the same application we used for Split join scenario.

  1. Create a new starter flow. Starter flow – Create a new work object, should be checked in process tab.

We will use the same flow we used for Split join scenario.

  1. Create three test operator IDs for approval process.

a) Operations manager
b) Seller manager
c) Sales manager

Make sure their access group points to amazon application. (manager/ admin) any access group is okay.

  1. Create a new work party rule.

Note: I am reusing the starter flow (Mentioned in step 2) for the Amazon salescase – So updated the workparty rule –pyCaseManagementDefault.

If you create a simple starter flow without any case, then update a Work party rule – Default.

Here, I have listed three parties as per the split for each requirement. We will see why we need this rule shortly.

Please look at (http://myknowpega.com/2017/05/13/workparties/) for more details on ‘workparties’.

5. You can create a single flow for approval process.

Since we use workparty, we can reuse the ‘PartyApproval’ flow.

Now let’s test the Split for Each scenario

Step 1: Open the flow we created. Replace the split-join shape with Split for Each shape.

Step 2: Double click on the split for each shape and open the properties panel.

Choose join condition – Any

Page property – pyWorkParty

Process flow – PartyApproval

PartyApproval is a standard approval flow. We can reuse it 🙂

Step 3: Run the flow. Since we specified workparties, provide it in the new harness.

We have successfully routed to the 3 workparties 🙂

Step 4: Login to seller manager and check the worklist.

Step 5: Open and approve the process.

Once have approved, you can see that the other 2 assignments are cancelled and the primary flow moved to next assignment which is to dispatch the product. This is because we used Join – Any.

Please practice other join conditions and test on your own.

SpinOff

What are the prerequisites to test SpinOff?

  1. Create any new implementation application or you can use an existing one.

We will use the same application we used for Split join scenario.

  1. Create a new starter flow. Starter flow – Create a new work object, should be checked in process tab.

We will use the same flow we used for Split for Each scenario.

  1. Create a new workbasket and map it to workgroup.

Specify the work group as same as you have mentioned in operators.

4. Create a simple flow rule. In the assignment shape – specify the workbasket name.

Now we are ready to test. 

Step 1: Open the flow we created. Replace the split-join shape with a sub-process shape.

Step 2: Open the sub process shape. Specify the flow rule. Don’t forget to check Spinoff flow.

Step 3: Run the flow.

You can see the pure parallel processing. Two assignments from primary flow and the sub process flow (workbasket). There is no such join conditions.

Step 4: Verify the workbasket assignment.

We are at the end of testing 🙂

Hope you understood the basics of these parallel processes in flow rule.

For a change, next topic will be on Integration.

WE ARE GONNA INTEGRATE WITH ‘REST’ (http://myknowpega.com/2017/05/30/service-rest-step-step-tutorial/)

Coming soon 🙂

 

  1. Raviteja Raviteja

    Great Read Prem, Thanks.
    Could you also please help in detailing activities with all methods, data transforms, decision category, connectors/services (SOAP/REST) possibly with examples.

    Your blog is best of lot!! Keep going Prem.

    • Premkumar G Premkumar G

      Thanks Raviteja. I will keep it in mind. You can see those topics in the upcoming days 🙂

  2. Brahmesh Brahmesh

    When to go for parallel task(assignments​) processing and parallel work processing (subcases)? I see , only one advantage of work processing is security control . Can you please share better use cases . Do you have any plan to make a post for case management .

    • Premkumar G Premkumar G

      Yes, Brahmesh. I will explain it in detail in my case management post. 🙂

    • Rupesh Rupesh

      Hi Brahmesh,

      “Security control” for parallel work processing ?

      can please make it more clear ..

      Thanks
      Rupesh M

  3. Yuvansh Yuvansh

    Can you post something related to Single sign on or LDAP configuration…….

    • Premkumar G Premkumar G

      Thanks for the comment Yuvansh. I will try to make a post soon 🙂

  4. Parwej Alam Parwej Alam

    Hi Prem, can we use it for worklist?

    • Premkumar G Premkumar G

      Yes. We we can spin off to worklist too

  5. Raunak Jaiswal Raunak Jaiswal

    Hi Prem
    Post was very helpful . Really appreciate you for that.
    One question Prem for split for each and split join ? How does assignment table look like . I mean value in pxrefobjkey and pzinskey and pxassignment key if its processesing in same or other work object ??
    Any idea ??

    Thank you

    • Premkumar G Premkumar G

      Hi Raunak,
      Split Join and Split For each can invoke a new flow parallely.
      If those flows contains assignment shape and when the flow enters assignment shape new entry is made in the assignment table.
      You can open the Assign-Worklist class and check the key 🙂

      You will see, pxRefObjectKey ( Work item pzInsKey) and pxFlowName
      pxFlowName is introduced, because you have multiple assignments opened for an work item. So no conflicts in making an entry to assign table

  6. Amit Amit

    Can you please explain difference between obj-open and obj-open-by handle in detail.??

  7. Abdul Mohammed Abdul Mohammed

    Hi Prem,

    Super Like..!!! Thanks for this post, You explained it really well..!
    can you Please explain me abut the cover, covered and folder objects and how can we use them. I am really confused regarding this.
    Thanks.

    • Premkumar G Premkumar G

      Thanks Abdul :). I will try to make a post on cover and folders soon

  8. Rajesh Rajesh

    Hello Premkumar,

    The way your explanation is very good and impressive.
    Coming to the point, with the above approach for approval using Split join and Split for Each, can we consider that alternative approach for Casecading approval(Report Structure and Matrix Authority).

    Thanks
    Rajesh

    • Premkumar G Premkumar G

      Yes Rajesh. You need to prefer using smart shape cascading approval for the above scenario :). Just for an explanation, i used split join and split for each 🙂

Leave a Reply

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

error: Content is protected !!