Automic Workload Automation

Expand all | Collapse all

Start a task with a delayed time in a workflow

Jump to Best Answer
  • 1.  Start a task with a delayed time in a workflow

    Posted 03-12-2019 10:08 PM

    Dear Experts,

     

    I have a workflow with 3 tasks. ( Task1/Task2/Task3 )

    Task 2 should start 15 mins delayed after Task 1 is completed.

    Could you please guide me how to achieve this?

     

    Thank you,
    Kiran



  • 2.  Re: Start a task with a delayed time in a workflow

    Posted 03-13-2019 03:46 AM

    Hi

     

    Plan A: put an EVNT.TIME object (with 15 Minutes) between both tasks

    Plan B: You could use a precondition in Task B to wait

     

    cheers, Wolfgang



  • 3.  Re: Start a task with a delayed time in a workflow

    Posted 03-13-2019 04:16 AM

    Hi ,

     

    There are many workflows that may require this condition.

    Can you help me with Plan B?



  • 4.  Re: Start a task with a delayed time in a workflow

    Posted 03-13-2019 02:56 PM

    Plan C: use the WAIT script command.

    Automic 

    This command could be used inside of the process script of each job, but we thought it was better to keep it separate.  So we put it in a separate script object with an override-able time variable that we then add to our workflows as a separate task. (very similar to PLAN A, but provides granularity down to seconds)



  • 5.  Re: Start a task with a delayed time in a workflow

    Posted 03-13-2019 09:55 PM

    Hi Pete,

     

    Thank you for your inputs.

     

    I tried this: TaskA->Script(only with Wait)->TaskB.

    But When I execute the workflow, the script is executed first ,it waits for the duration mentioned in the script, executes TaskA and then TaskB.

    Attached the screenshot.

    If anything missing, Please let me know.

     

    Regards,

    Kiran

     



  • 6.  Re: Start a task with a delayed time in a workflow

    Posted 03-14-2019 06:13 AM

    Hi

    Plan B: here you go...

     

    Regarding your wait -issue -yes you are missing the good old "Generate@Runtime" checkbox on properties tab :-)

     

    cheers, Wolfgang



  • 7.  Re: Start a task with a delayed time in a workflow

    Posted 03-14-2019 06:17 AM

    Just a short hint to Plan C: you can put it onto POST_PROCESS of your SAP Job.

     

    Doing so you do not need a seperate Script with just a : WAIT command (and the checkbox "Generate at runtime" checked)

     

     

    cheers, Wolfgang



  • 8.  Re: Start a task with a delayed time in a workflow

    Posted 03-14-2019 11:19 PM

    Thank you Wolfgang.

     

    I have tested both the options as you mentioned.

    Plan A - Event based - Working fine

    Plan B - pre-condition - Plan A and Plan C came close to the expected result. Pre-condition had more delay compared to script as the granularity is in mins compared to seconds. However it is still a good option in certain cases.



  • 9.  Re: Start a task with a delayed time in a workflow
    Best Answer

    Posted 03-14-2019 06:46 PM

    Wolfgang is correct, your Script(only with Wait) is executing too early because you have not turned on the "Generate at runtime" option.



  • 10.  Re: Start a task with a delayed time in a workflow

    Posted 03-14-2019 11:15 PM

    Thank you Pete.

    I have used the option( Plan C ) as you mentioned and its working perfectly fine.