BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Multi-instance loop instances with different teams?

    Posted Wed November 04, 2020 08:33 AM
    Hi All,

    Is it possible to assign each instances of a multi-instance loop type activity to a different team? I mean if we have three teams, say team1, team2 and team 3, and we need to execute three instances of the same activity in parallel, can we somehow assign team1 to the first instance, team2 to the second and team3 to the third activity instance of the same multi-instance loop type activity?

    Or should we create a three-way parallel gateway with one activity in each path with appropriate team assignments?

    Thx,

    ------------------------------
    ____________________
    Laszlo
    ------------------------------


  • 2.  RE: Multi-instance loop instances with different teams?

    Posted Wed November 04, 2020 03:53 PM
    I think it should be possible by using the step counter to select a team defined by a retrieval service.

    https://www.ibm.com/support/knowledgecenter/SS8JB4_20.x/com.ibm.wbpm.wle.editor.doc/topics/creating_loops_C.html

    (Team filtering should be avoided in my opinion, since it creates temporary teams)

    ------------------------------
    Mattias Edling
    ------------------------------



  • 3.  RE: Multi-instance loop instances with different teams?

    Posted Wed November 04, 2020 04:58 PM
    Hi Mattias,

    Thanks for your answer! I will try your idea.

    Thx,

    ------------------------------
    ____________________
    Laszlo
    ------------------------------



  • 4.  RE: Multi-instance loop instances with different teams?

    Posted Thu November 05, 2020 03:50 AM

    Hi Laszlo,

    I have tried the solution from Mattias and I think it will work for you. Steps I did:
    - Create a string list contains teams list:


    - Set the activity to multi-loop:


    - Config activity assignment:


    Result: 



    Thanks, 
    Tung





    ------------------------------
    Tung Nguyen
    You Get BV
    ------------------------------



  • 5.  RE: Multi-instance loop instances with different teams?

    Posted Thu November 05, 2020 03:54 AM
    Hi Tung,

    Yes, it works like a charm. 

    Thx,

    ------------------------------
    ____________________
    Laszlo
    ------------------------------



  • 6.  RE: Multi-instance loop instances with different teams?

    Posted Thu November 05, 2020 06:43 AM
    Edited by Mattias Edling Thu November 05, 2020 06:46 AM
    I wonder if the team list could be constructed in the pre-assignment script instead (run once or for every iteration, perhaps does not matter?). As a process analyst I want to minimize the occurence of script activities and system details in my BUSINESS process diagrams :-) This was also why I speculated if a team retrieval service could serve a similar purpose, but after checking it out briefly I am not sure if that is feasible or appropriate. The retrieval service seems part of the team to retrieve members, rather than as a service called from the activity assignment section to retrieve a team. Could the "Team" field under assignment use an expanded JS expression or code snippet to construct/retrieve the list of teams and select the right one?

    ------------------------------
    Mattias Edling
    ------------------------------



  • 7.  RE: Multi-instance loop instances with different teams?

    Posted Thu November 05, 2020 06:57 AM
    Hi Mattias,

    Finally I pass the the instance index to the team retrieval service and choose the team according to the index. I was not sure if I can use the instance index for this purpose, but it works nice.

    Thx,

    ------------------------------
    ____________________
    Laszlo
    ------------------------------



  • 8.  RE: Multi-instance loop instances with different teams?

    Posted Thu November 05, 2020 11:19 PM
    @Mattias Edling You probaly can pass the JS expression there so you dont need to the script activity before the assignment, for example:
    if (tw.system.step.counter == 0) { ROLE:'Team1'; } else if (tw.system.step.counter == 1) { ROLE:'Team2'; } else { ROLE:'Team3'; }​
     ​


    @Laszlo Kertesz do you mean team retrieval serivice or team filter service? What I know is the team retrieveal service is set inside a Team so how do you pass the instance index to the service from the process level?

    Thanks, 

    Tung


    ​​​



    ------------------------------
    Tung Nguyen
    ------------------------------



  • 9.  RE: Multi-instance loop instances with different teams?

    Posted Fri November 06, 2020 02:39 AM

    Hi Tung,

    Your'e right, team filter service what I use and to which I pass the instance index. Within the service I use a switch construction to select the team according to the index.



    ------------------------------
    ____________________
    Laszlo
    ------------------------------