Automic Community

Expand all | Collapse all

Abort Job Based on Condition

Jump to Best Answer
  • 1.  Abort Job Based on Condition

    Posted 09-09-2019 03:40 PM
    Edited by Ugandhar Palamasi 09-10-2019 04:12 PM
    Hi All,

    We are using Automic (Application Manager) release V9.2.2. I have a requirement to abort a job based on the file size generated. In my chain, I have 5 jobs. 3rd job will generate a reject file. 4th job, I want to check the size of the file and if it is greater than zero I wan to abort he chain and I don't want 5th job to be executed. Currently when I use the condition on the 4th job to set the "ABORT TASK", it is aborting the job 4, but it is not stopping the job 5. Is there any way I can achieve this? 

    Currently I have the condition as:
    Job: AA_ECHO
    Condition: Timing: Before Condition: user defined
    If `cat file.txt | wc -c` > 0
    Abort Task

    Thanks Ug.

  • 2.  RE: Abort Job Based on Condition

    Posted 09-09-2019 04:38 PM

    Try using BLOCKED instead of ABORT task. Also check if the successor and predecessors are set properly

    Thanks Shravani

  • 3.  RE: Abort Job Based on Condition

    Posted 09-09-2019 04:51 PM
    I have checked the successor and predecessors, they look fine. I don't see an option - BLOCKED.

  • 4.  RE: Abort Job Based on Condition
    Best Answer

    Posted 09-26-2019 02:17 PM
    Try to use CANCEL PROCESS FLOW action option instead of ABORT_TASK..  This action cancels all remaining non-running components ion the Process Flow, plus any components in its parent and child Process Flow. This action should only be assigned to Process Flow components, do not assign it to Jobs or Process Flows that run outside of a Process Flow.
    Thanks, Juan