BPM, Workflow, and Case

 View Only
  • 1.  How to modify due date of an activity?

    Posted Wed June 08, 2022 04:22 AM
    Hi,

    we have a human task (violet frame) in a multi-instance step like this:


    There is an independent function to modify the due date of this human task. That function sends a message with the new due date which is received by the intermediate message event in red frame. The script attached to this event sets the triggering time of timer in blue frame using the rescheduleTimer system function (thanks to Atanu for the solution for this).

    But the task due date remains the original. I want to modify the due date of the human task (just to show the new value in Process Inspector or in Process Portal), but I don't know how.

    The human task is accessible by calling the tw.system.step in its pre-assignment, but step do not have due date. The step has a task property (which has due date), but it is null. Modifying the variable used to set the task due date has no effect (Priority setting / Due in).

    So how can we modify the due date of the task?

    Thx,

    ------------------------------
    Laszlo
    ------------------------------


  • 2.  RE: How to modify due date of an activity?

    IBM Champion
    Posted Wed June 08, 2022 06:35 AM
    Hi Laszlo,

    Can you share the code you are using to update the due date ?
    It should be something like - 
    tw.system.findTaskByID(<tk_id>).dueDate = date; // date is of TWDate type​


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



  • 3.  RE: How to modify due date of an activity?

    Posted Wed June 08, 2022 07:10 AM
    Edited by Laszlo Kertesz Wed June 08, 2022 07:14 AM

    Hi Atanu,

    That's the problem: I don't know how to retrieve the task id of the human task. There is no tw.system.task variable at that point (pre-assignments), just tw.system.step, but step ID is not the same as task ID, and tw.system.step.task is null here.

    The human task is within in a parallel multi-instance subprocess, which can be started multiple times parallel - but I'm not sure if it matters.

    I can't wait till the task finished, and get the task ID in post-assignments (if there work this), because must be able to change the due date before and while the task is executed.

    Within the human task there is no task info at client side, but as I wrote, I must be able to modify the due date while task is assigned but not claimed yet.

    I don't see the solution :(

    Could you help me please?

    Thx,



    ------------------------------
    Laszlo
    ------------------------------



  • 4.  RE: How to modify due date of an activity?

    IBM Champion
    Posted Wed June 08, 2022 11:15 AM
    Hi Laszlo,

    As your repeatable IME is updating the due date, you can get the task id post execution of the IME itself.
    Or you can have another timer on the task, which will be triggered immediately after the start of the step and get the task id in the post execution of that timer.


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



  • 5.  RE: How to modify due date of an activity?

    Posted Wed June 08, 2022 11:28 AM
    Ahh, that's a good idea. Thanks!

    ------------------------------
    Laszlo
    ------------------------------