How-To: Kick Off a Workflow to Run in the Middle
Overview
Running a Workflow with a specific parameter allows you to override certain tasks that will skip the logic in those particular tasks and immediately run the subsequent tasks.
Prerequisites
Basic understanding of JSON.
Familiarity with the Workflow and Task concepts in our application.
Familiarity with running a Workflow with Parameters
Steps
Step 1 - Access a Workflow
Navigate to the Workflows page.
Click on the Workflow you want to run with parameter overrides.
Step 2 - Open Parameter Overrides
Click the button with the parameters symbol
{...}
to open the Parameter Overrides modal.
Step 4 - Providing Parameter Override
In the Parameter Overrides section, you will see a Task overrides JSON structure already created from the Tasks in your Workflow.
The JSON structure will include:
A
task_overrides
key with an array of Task objects.Each Task object will include:
A
name
key with the Task's name.An
environment_variable_overrides
key with key-value pairs for the variables already within that Task.
You can edit the JSON structure directly in the editor.
As you type, the editor will indicate any syntax errors or inconsistencies with your JSON structure.
For the task(s) that you would like to skip/override, you will need to provide the specific variable:
SHIPYARD_OVERRIDE_STATUS
If you would like that override to be skipped and continue to a task with a successful path (Exit Code
0
), you will need to provide either of the following values:"SHIPYARD_OVERRIDE_STATUS": "SUCCESS"
"SHIPYARD_OVERRIDE_STATUS": "SUCCESSFUL"
If you would like that override to be skipped and continue to a task with an errored path (Exit Code
1
), you will need to provide either of the following values:"SHIPYARD_OVERRIDE_STATUS": "ERROR"
"SHIPYARD_OVERRIDE_STATUS": "ERRORED"
Step 5 - Check the Logs
If a fleet has been skipped/overriden due to the
SHIPYARD_OVERRIDE_STATUS
Environment Variables being set, you will see that task be set with a status of "Success". However, you won't see any of the overriden tasks appear in the graph as well as the Last Run, Retries, Billable Runtime, and Duration remaining unset.
info
Although those runs do not appear on the graph, clicking into the logs for the overridden task will show an output of "Task has been skipped due to override."
Example JSON
{
"task_overrides": [
{
"name": "Override Task",
"environment_variable_overrides": {
"SHIPYARD_OVERRIDE_STATUS": "SUCCESS"
}
},
{
"name": "Success Task",
"environment_variable_overrides": {
}
}
{
"name": "Failure Task",
"environment_variable_overrides": {
}
}
]
}
Screenshots
Workflow Example With Success and Failure Paths

Override with Success Parameter

Log Overview

Success Override Log Output

Override with Error Parameter

Error Override Log Output

Limitations
Workflows can only be kicked off in the middle if all prior tasks have the
SHIPYARD_OVERRIDE_STATUS
properly set