Automic Workload Automation

 View Only
  • 1.  Using Calendar in Workflow

    Posted Nov 28, 2022 05:39 PM

    I have a workflow.  This workflow is set to run from the JSCH at 8pm on the 19th of the month.  This is set to generate the task at activation time.  The task

    This workflow has two branches:

    A – No calendar, runs when workflow starts.  This task is set to Generate task at run time.

    B – All tasks in this branch run on the 20th of the month at 2am, 2:20am, 2:30am, 2:40am & 2:50am using a calendar.  Each of these tasks are set to Generate task at run time

    When I ran the job only the A branch ran.  It did not run the B branch tasks.  The workflow remained running but did nothing and had to be manually canceled

    I've gone through the documentation and I should be able to use calendar conditions in the workflow tasks.  But obviously I am missing something.  Is it as simple as setting the attribute to Generate the task at activation within the tasks in the workflow?

    Any direction would be appreciated.

    Tim






    ------------------------------
    Developer
    State of Colorado
    ------------------------------


  • 2.  RE: Using Calendar in Workflow
    Best Answer

    Posted Nov 29, 2022 09:09 AM
    You need to add a day (+1) under the earlies start time heading and not set it on a calendar.  You would also need to do this on every step of branch B.  The calendar would be better situated to use if the total workflow is run on recurring days and you only want certain steps to run on a certain amount of those days.


  • 3.  RE: Using Calendar in Workflow

    Posted Nov 29, 2022 02:23 PM
    Hi James,

    Thanks for the tip.  I have removed the calendar and set each task to Real Date +1.  It will run tonight and I'll see how it works.

    Tim

    ------------------------------
    Developer
    State of Colorado
    ------------------------------



  • 4.  RE: Using Calendar in Workflow

    Posted Nov 30, 2022 03:42 PM
    Thanks James.  That worked perfectly in my test.

    ------------------------------
    Developer
    State of Colorado
    ------------------------------



  • 5.  RE: Using Calendar in Workflow

    Posted Nov 29, 2022 10:34 AM

    The calendar conditions you set for a task must be a subset of the calendar conditions of the containing object. 

    In other words, using calendar conditions, a job in the workflow can only run on the occurrences of the parent workflow but use calendar conditions to skip some.

    In your case, if the parent workflow only runs the 19th the calendar conditions for the tasks in the branch B is never true.

    There are a couple of options to get what you want but first, I need to know...

    When you say "B – All tasks in this branch run on the 20th of the month at 2am, 2:20am, 2:30am, 2:40am & 2:50am using a calendar. "  do you mean all the tasks run sequentially at 2am and all agent and 2:20 and etc or the first task of branch B runs at 2, the second at 2:20 and so on?

    Do these need to be in the same workflow?




  • 6.  RE: Using Calendar in Workflow

    Posted Nov 29, 2022 02:28 PM
    Hi Richard,

    Good information about calendar usage.  The first task of branch B runs at 2, the second at 2:20 and so on.  I am the admin and a user put this workflow together.  I think he wants to group related jobs.  I am running a test with James suggestion of real date +1.  Based on how that turns out, I will ask the user if they can and would like to separate the task.

    Tim

    ------------------------------
    Developer
    State of Colorado
    ------------------------------