Automic Workload Automation

 View Only
  • 1.  External dependencies

    Posted Nov 21, 2016 03:47 PM
    Hi,

    Currently we are not using external dependencies and have our own way of waiting for parent (based on 'done' files created by the parent). But want to explore the external dependencies feature in Automic. We have done some tests already and have the below questions. Please can some one help us on this.

    1) How can we make a child workflow wait for a particular hour's run of the parent wf. i.e : The parent workflow runs every hour of a day but the child should start only when the last hour (23rd hour) of the parent run is completed successfully.
    2) If in case the 22nd hour's instance ran for 2 hours, the child should still wait for the 23rd hour run (which would have actually started 1 hour late) to get completed.

    Please confirm if this scenario can be achieved in automic. Thanks!


  • 2.  External dependencies

    Posted Nov 21, 2016 05:17 PM
    The parent workflow could have a process script added to it that evaluates the time-of-day that it was launched (this requires turning off the "generate at runtime" option.)  When it detects it was launched in the 23rd hour, it would set a variable to that effect.

    Does the child workflow have to be external?  I would probably just embed it right into the parent workflow as the last step, and then a simple precondition rule on that last step could interrogate the variable that has been set and result in either "run" or "skip".

    If the workflow needs to remain external, then I would probably set up a static variable object (instead of using a local variable) and the first step of the child workflow would have a precondition rule to loop until that variable has been satisfied.


  • 3.  External dependencies

    Posted Nov 21, 2016 05:22 PM
    If you don't like having a precondition rule that loops, you could imbed a new step into the parent workflow that doesn't do anything, but it only executes on the 23rd cycle based upon the local variable.   Then the external predecessor rule in the child workflow would be dependent upon seeing this do-nothing step execute.

    We have actually used this method in several of our production solutions.  We like to call the do-nothing step a successor step, because it exists to trigger successors.