Skip to content

Terminating a workflow

Alan B. Christie edited this page Aug 14, 2025 · 2 revisions

A decision about whether the workflow ends is done on reception of the PodMessage event (message) that is received by the engine's handle_message() method. At this time the engine logic will determine that there are no more steps to launch. When this happend the engine MUST: -

If the final PodMessage has indicated a failure (its exit_code is non-zero) the Required Actions described in "Handling launch errors" must be followed.

If the final PodMessage has indicated success the following actions are required: -

Required Actions

The engine must decide whether the workflow has outputs. If it does it must pass the identity of the RunningWorkflowStep to the API realise_outputs() method. This allows the DM to copy the output files of the step to the workflow Project directory.

The API method set_running_workflow_step_done() must be called, setting success to True and setting error_num to 0 (zero).

The API method set_running_workflow_done() must be called, setting success to True.

- DESIGN FLAW -
More than one step can declare outputs, so the engine needs to be able to pass an array of RunningWorkflowStep UUIDs.
Clone this wiki locally