Automic Workload Automation

  • 1.  Abort execution in For Each Workflow

    Posted Dec 22, 2016 11:09 AM

    Hello,

    I am looking for some help on how to correctly abort processing of a For Each Workflow.

     

    Context: I am configuring a Workflow that should behave like this, from a high-level perspective:

    1: Look for trigger files on FTP location;

    2: Loop each trigger file

      a: Copy similar-named file to external system

      b: Copy that same file to some archive location

      c: Remove trigger file

     

    I have everything working, however I cannot seem to get the error scenarios covered in the way I would like. I would like the Loop to abort when something goes wrong, e.g. archive location is out of disk space, or some directory doesn't exist.

    From a technical point-of-view I have a For Each Workflow with two FTP Agent Jobs inside. The first job performs task 2a and the other job performs 2b and on success 2c. I configured both jobs On Failure to "Skip remaining files and abort the job". On failure however, the For Each Workflow is not aborted. I configured, in Post Processing a MODIFY_STATE, but that also doesn't abort the For Each Workflow.

    I can think of a very ugly workaround -- create and populate some variable "ERROR_OCCURRED" and read that in Pre Processing in every step in the For Each Workflow...but there has to be a better way!

     

    Thanks!

    Alwin



  • 2.  Abort execution in For Each Workflow

    Posted Dec 22, 2016 01:51 PM
    Hi Alwin,

    You can either create a dummy task inside the workflow and set the task property - Dependencies to "Abort"
    z6a2ofu5n434.png
    or
    on the task property of the task that fails, go to Postconditions tab and do:
    7cn1uj8mz314.pnghttps://us.v-cdn.net/5019921/uploads/editor/wy/7cn1uj8mz314.png" width="1003">




  • 3.  Abort execution in For Each Workflow

    Posted Dec 23, 2016 04:30 AM

    Hi Christine,

    That was exactly what I was looking for.

    Thanks for the quick reply!

    Alwin