Automic Workload Automation

Expand all | Collapse all

Dynamically block a task from post process?

  • 1.  Dynamically block a task from post process?

    Posted 07-11-2019 06:10 PM
    Edited by Pete Wirfs 07-11-2019 06:12 PM
    I'm looking for a way to have a post-process script tell a windows job to "BLOCK" the workflow upon failure. This needs to be dynamic. But I can't seem to find a any way to accomplish this from the scripting language.

    I know I can do this with workflow task PostCondition logic, and that may be my only option.  But doing it in the post-process would be simpler to maintain as I could deploy the solution with an include.

    ------------------------------

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


  • 2.  RE: Dynamically block a task from post process?

    Posted 07-11-2019 06:44 PM
    Hey Pete,

    Whats the use case here? Parsing a report for a sting? My only thinking would be to use a MODIFY_STATE script function in the post process and let the normal dependencies pick it up.


  • 3.  RE: Dynamically block a task from post process?

    Posted 07-11-2019 08:46 PM
    When this particular set of jobs fail, they were designed to just send out a low-priority alarm and let all successors run because recovery can usually take place the next day.

    However we have now added post-process intelligence to scrape reports and if we detect any of 6 catastrophic error messages, we escalate the alarm to high-priority.  This has been working to everyone's satisfaction.  

    However when the problem is escalated to high-priority, they would also like it to block the workflow since the nature of these catastrophic errors is that important remote services are probably down and would cause all tasks to fail, therefore we should stop.

    The obvious solution is to set a variable in the post-process logic and use that variable in a PostCondition rule to block the task (I've already tested this successfully.)  But if this is my best solution, we will need to copy/paste the PostCondition rules into over 100 workflow tasks, and remember to add it onto future new tasks.  This is very doable, but I thought I should explore the script option anyway as maintenance would be reduced.

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



  • 4.  RE: Dynamically block a task from post process?

    Posted 07-12-2019 01:14 AM
    Hey Pete

    I guess the objects are not belonging all to the same solution? If they do, a SYNC-solution might be an option here.

    Regards
    Joel

    ------------------------------
    Swisscom & WorkflowCommander
    ------------------------------



  • 5.  RE: Dynamically block a task from post process?

    Posted 07-12-2019 02:34 AM
    Hi Pete,
    I have a similar use case.
    For that case, i use a notification object ( Call operator ) and i check teh status of the call operator making sure somebody answered 'OK' on it before going on.
    In the post-process it looks like this:

    : SET &CALL_STATUS# = 0000
    : WHILE &CALL_STATUS# NE 1900
    : SET &CALL_NR# = ACTIVATE_UC_OBJECT(EX.TIMEOUT_ALERT.CALL, WAIT)
    : SET &CALL_STATUS# = GET_STATISTIC_DETAIL(&CALL_NR#, STATUS)
    : ENDWHILE

    ------------------------------
    Best regards,
    Thierry

    Banque de Luxembourg
    ------------------------------



  • 6.  RE: Dynamically block a task from post process?

    Posted 07-12-2019 01:05 PM
    I really like the SYNC idea. 

    I see how the CALL/WAIT option would work too.

    Guess I'll have to experiment with both!   Thank you a bunch for giving me some scripting options to try!

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