Parent Workflow Remains Active When Nested Child Job Abends
search cancel

Parent Workflow Remains Active When Nested Child Job Abends

book

Article ID: 441284

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Symptoms:

 

  • When a child job abends within a nested workflow hierarchy (e.g., a workflow within a workflow), some parent workflows correctly show as abended or blocked, while others remain in an "Active" status despite the failure.

 

 

Environment

 

Product: CA Automic Workload Automation - Automation Engine

Version: 24.4.3

 

 

Cause

 

The issue relates to how PostConditions (in a JOBP/Workflow) are utilized to block a task.

When a task is blocked using the PostCondition level configuration, the blocked status fails to propagate up to the parent objects.

 

 

Resolution

To properly observe a "Workflow is blocked" status at the parent workflow level, a three-part configuration strategy must be implemented:

Step 1: Shift Blocking Logic to Time & Dependencies

  • Do not use "Blocks" at the PostCondition level.

  • Instead, use the Time & Dependencies settings on the node after the task in question.

  • Configure this subsequent node to run only based on the specific State/Status expected of the previous job.

  • In the ELSE section of the Time & Dependencies, set the action to "Block task and send abort signal to parent".

Step 2: Control the Job's Ending Status

  • You must ensure the job terminates with the specific status you expect.

  • For example, REST API calls may return a 200 (Successful) code, but the payload may not contain the logically expected results.

  • To account for this, evaluate the returned results within the PostProcess section and use the MODIFY_STATUS script function to manually set the appropriate status.

  • By doing this, the subsequent node (configured in Step 1) will detect that the preceding job did not end with the expected status, triggering the ELSE condition and allowing the status to propagate upwards.

Step 3: Update Parent Workflow PostConditions

  • In the parent process/workflow, you must configure the PostCondition to check for: IF task ended with status ANY_ABEND -> Finally BLOCK.

  • Without this specific configuration, the parent-level workflow will incorrectly reflect the status "ENDED OK - ended normally".

  • This step captures the "send abort signal to parent" generated by the lower tasks, finally allowing the parent process to correctly reflect that the workflow is blocked.