You can resume a workflow run from the last failed activity if resuming a failed run is enabled for the workflow.
When the resume failed workflow feature is enabled, you can change the parameters of the workflow and try to resume it. You can also retain the parameters and change external components that affect the workflow run. If you do not select an option, the workflow run times out and cannot be resumed. For modifying the timeout period, see Set Custom Properties for Resuming Failed Workflow Runs.
In this use case, you create a simple workflow designed specifically to fail during its run. This workflow demonstrates the basic functionality of the resume failed workflow feature.
- Log in to the vRealize Orchestrator Client.
- Navigate to New Workflow. , and click
- Enter the name resume workflow test and click Create.
- On the Summary tab, click the Resume workflow from failed behavior drop-down menu.
- Select Enabled.
- On the Inputs/Outputs tab, click New.
- Create an input parameter with the following properties.
Option Description Name fail Type boolean
- On the Schema tab, drag three Scriptable task elements into the schema diagram.
- Name the schema elements before failure, failure, and after failure.
- On the Scripting tab of the before failure element, enter System.log("Before failure");.
- Add the
failinput parameter to the failure element.
- On the Scripting tab of the after failure element, enter System.log("After failure");.
- Save the workflow, and click Run.
- Toggle on the fail check-box, and click Run.
The workflow run reaches the Waiting state.
- On the top-right, select Answer.
- To cancel the workflow run, select Cancel and click Answer.
- To resume the workflow run, select Resume, and navigate to the Parameters tab.
- Toggle off the fail check-box, and click Answer.
The workflow run reaches the Completed state.
You now know how to manage failed workflow runs.