Automic Workload Automation

 View Only
  • 1.  Skip external job dependency in workflow if it's not completed within 1 hour

    Posted Aug 14, 2019 09:14 AM
    Hi,

    I want to skip an external job dependency in a workflow if it is not completed within 1 hour of start time. Is there anyway to implement this in time & dependencies tab of workflow. Requirement is as below.

    I have a JOBP (let's call it workflow JOBP-A) which has 3 external JOB dependencies (Let's call them JOB-A, JOB-B, JOB-C) and an actual job (JOB-D). JOB-A, JOB-B and JOB-C are dependencies for JOB-D. JOB-D should start when 3 external dependencies are satisfied.

    I want to define timeout on external JOB-A. For example if the external JOB-A is not completed within 1 hour of JOB-A start time, I want to skip JOB-A external dependency for that run. JOB-D in workflow JOBP-A should continue run with just two external dependencies JOB-B, JOB-C. However if the JOB-A is completed within 1 hour of it's start time, JOB-D should run with all three external dependencies. Is there any way to configure jobs/workflows to implement this requirement?

    Thanks in advance.

    NK


  • 2.  RE: Skip external job dependency in workflow if it's not completed within 1 hour

    Posted Aug 14, 2019 11:14 AM
    Never done this before, but here's an idea;

    The JOBP-A dependancy to JOB-A will need to watch for a "trigger event" instead of for the completion of JOB-A.  Then set up two different ways for the trigger event to occur; JOB-A completion, and JOB-A  has been running for 1 hour.  This trigger event could be the execution of an empty script object eg JOB-A-TRIGGER.

    Then you need to make two modifications to JOB-A:

    1. When JOB-A starts, it needs to launch another script object that does a :WAIT 3600 and then executes JOB-A-TRIGGER.
    2. When JOB-B finishes, it needs to execute JOB-A-TRIGGER.

    To launch another object via script: ACTIVATE_UC_OBJECT(JOB-A-TRIGGER)

    ------------------------------
    Pete (AE V11.2)
    ------------------------------



  • 3.  RE: Skip external job dependency in workflow if it's not completed within 1 hour

    Posted Aug 14, 2019 11:17 AM
    Instead of using :WAIT 3600, it would be better to launch JOB-A-TRIGGER with a future "logical date" parameter to the ACTIVATE_UC_OBJECT() function, so it automatically waits an hour before it starts executing.

    ------------------------------
    Pete
    ------------------------------



  • 4.  RE: Skip external job dependency in workflow if it's not completed within 1 hour
    Best Answer

    Posted Aug 15, 2019 11:26 AM
    Am I missing something?  Why not use the Timeout After else skip task properties under the external dependency?  Note this screenshot shows a timeout of a minute and not an hour.,    
    task properties
    There is something to be aware of though.    The time starts when the dependent job is ONLY waiting on external dependencies.

    You can work around this by hanging a dummy script (make sure generate at runtime is set) after the external dependency and making the real job dependent on that. 




  • 5.  RE: Skip external job dependency in workflow if it's not completed within 1 hour

    Posted Aug 15, 2019 12:57 PM
    I'm the one that missed something.  I was unaware of this cool feature.

    ------------------------------
    Pete
    ------------------------------