BPM, Workflow, and Case

 View Only
  • 1.  Need to assign instance to each user group based on % mentioned on the UI

    Posted Mon November 27, 2023 03:09 PM

    Hey All,

    Problem Statement : -

    The user will have an stand alone UI, which has a percentage configurator which cannot be more than 100%. Now, suppose if I set it to 30 and 20 percent, out of 10 instance launched today, I need to assign 3 cases to a certain team and another 2 cases to a certain team and remaining 5 would be completed. 

    Any thoughts or inputs how this can be achieved.



    ------------------------------
    Raghu Ram
    ------------------------------


  • 2.  RE: Need to assign instance to each user group based on % mentioned on the UI

    Posted Wed November 29, 2023 01:28 PM

    Hi ,
    On high level looks like you can use 
    1.Build Client Side human service to performan validations .

    2. Get all active tasks for that particual day. You can use saved search to get that information.
        eg.  examples-searching-processes-tasks
    2. Seggregate into 3 different list based on your percentage configurator.
    3. Run reassignment logic for 2 lists i.e assign to certain team.
          var task = tw.system.findTaskByID(1234);
          task.reassignTo(task.processInstance.snapshot.findParticipantGroupByName("MyNewTeam").associatedRole);
    4. Run Completion Script for 3rd list 
         tw.system.findTaskByID("1234").complete(user, outputValues)

    You can use rest api's too,to perform these operations.
    Hope it helps.

    Thanks
    Robin



    ------------------------------
    Robin Rajan
    ------------------------------



  • 3.  RE: Need to assign instance to each user group based on % mentioned on the UI

    Posted Thu November 30, 2023 05:41 AM

    Hi,

    Thanks for your response. Not sure if this will work, but let me give a try.



    ------------------------------
    Raghu Ram
    ------------------------------



  • 4.  RE: Need to assign instance to each user group based on % mentioned on the UI

    IBM Champion
    Posted Thu November 30, 2023 10:52 PM

    Hello Raghu,

    Can you please provide more details on the requirement like when are you expecting to calculate the assignment?

    Are you trying to set these percentages before task creation or are you trying to apply this logic on existing tasks on daily basis?

    Applying the logic and perform the assignment during task creation would be comparatively less complex but if you are looking to apply this on existing tasks, the solution would be complex and would consume significant amount of server resources depending on the number of existing tasks.

    Thanks!



    ------------------------------
    Atanu Roy
    Lead Engineer
    London Stock Exchange Group
    ------------------------------



  • 5.  RE: Need to assign instance to each user group based on % mentioned on the UI

    Posted Thu November 30, 2023 11:48 PM

    Hi Atanu,

    1) Firstly, there is a standalone page that is accessed by supervisor who would set the percentage on a daily basis based on volume of work. If you look at the image that is attached, Onshore is set to 20 and Offshore is set to 30 for Critical Case YES. 

    2) Now after the BPD is triggered, the first step has a variable which is called CRITICAL CASE - assuming that user selected this as YES and as stated above the percentage is set to 20 Onshore and 30 Offshore. 

    3) After completing the above step and moving to third step this is where the logic has to come into effect, here there is lane called QA and there are 2 human services which are bound to different teams, now based on the percentage the instance has to be assigned to either a) ONSHORE b) OFFSHORE c) COMPLETED . There is no sequence to whom this assignment should happen.

    4) Assuming that today there were only 10 instance launched, by the end of the day, when the report is taken, I should have 2 cases assigned to ONSHORE, 3 cases assigned to OFFSHORE and remaining 5 as COMPLETED.



    ------------------------------
    Raghu Ram
    ------------------------------



  • 6.  RE: Need to assign instance to each user group based on % mentioned on the UI

    IBM Champion
    Posted Mon December 04, 2023 01:26 AM
    Edited by Atanu Roy Mon December 04, 2023 01:26 AM

    Hello Raghu,

    If I am getting the requirement correctly, that you are trying to decide the task assignment based on the existing the workload for new tasks only during the task creation. On the first day, the task counts for both the teams would be zero. If this understanding is correct, then I think you can follow below steps - 

    1. You need to maintain the existing workload count for each somewhere, it can be a small table.
    2. During the task creation before assigning the team, decide the recipient team dynamically based on the existing workload
      1. Get the weight for each team, like 0.7 for onshore and 0.3 for offshore driven by your UI
      2. Get the total number of existing tasks
      3. Get the ratio for each team
      4. Based on the ratio and weight, dynamically calculate the assignment team
      5. Update the count in the table
      6. When a task is completed, update the count

    Hope this helps.

    Thanks!



    ------------------------------
    Atanu Roy
    Lead Engineer
    London Stock Exchange Group
    ------------------------------



  • 7.  RE: Need to assign instance to each user group based on % mentioned on the UI

    Posted Thu December 07, 2023 12:12 AM

    Hi Atanu,

    Thanks for that input, was thinking on similar lines, tried getting the count using TWSEARCH, while storing each of count in a table.



    ------------------------------
    Raghu Ram
    ------------------------------



  • 8.  RE: Need to assign instance to each user group based on % mentioned on the UI

    IBM Champion
    Posted Thu December 07, 2023 12:42 AM

    Hi Raghu,

    Yes, that works but can be expensive as you need to check the count of each task creation.

    There can be other options as well, like you can use a distributed cache like DynaCache as well.

    Thanks!



    ------------------------------
    Atanu Roy
    Lead Engineer
    London Stock Exchange Group
    ------------------------------