BPM, Workflow, and Case

 View Only
  • 1.  Move between tasks

    Posted Thu February 23, 2023 07:00 AM

    Hi!

    I use BAW version 21. I've read a lot about this and everywhere they write that it's not possible, but maybe you know a workaround for this problem. I exit one task and another task is assigned to me as well but there is a system task between these tasks. Is it possible to take this task automatically without having to start it from the Work tab?



    ------------------------------
    Łukasz Piotrowski
    ------------------------------


  • 2.  RE: Move between tasks

    IBM Champion
    Posted Thu February 23, 2023 07:24 AM

    Hello Łukasz,

    You can utilize the "Automatically flow to the next task" feature of the activity to open the next task automatically but the catch is that you cannot use any other step in between. So, if you can take the system activity inside the first activity and remove that from process level then, this feature would work.

    Thanks!



    ------------------------------
    Atanu Roy
    Solution Architect
    Salient Process
    ------------------------------



  • 3.  RE: Move between tasks

    Posted Fri February 24, 2023 04:53 AM

    Yes it is possible even with system tasks in between.

    As Lukasz states, enable autoflow and set process to execture for latency so your transactions are synchronous for completion of tasks.

    After that, you will have to prevent your task from completing the current task through the end-node, and instead completing it through the javascript API /rest/bpm/wle/v1/task/1234?action=complete&params={"oneParam":"1234"}&parts=all.

    After you have completed the task, through a serviceFlow, search up the next task in the flow for your process. tw.system.currentProcessInstance.tasks and loop through for the next task with status Received. Assign this task to the current user.

    After you have done this, instead of flowing through to the end-node, run the javascript 

    window.open("MYSERVER/ProcessPortal/launchTaskCompletion?taskId=44861","_self")

    Sadly, this will reload the entire ProcessPortal though, and can be quite slow. You also need some sort of mechanism to prevent other users from grabbing your task for the milliseconds before you assign it to the same user.

    The described solution might also require you to change the 100Custom-setting Autoflow-timeout, its default 3 seconds

    We currently have a solution kind of like described above, but we dont use ProcessPortal, but our own application, that open the next task through the api /teamworks/process.lsw?zWorkflowState=1&zTaskId=123456&zResetContext=true



    ------------------------------
    Johan Andersson
    ------------------------------