Defining an error path in a workflow

You can add a branch in your workflow so that if a job goes into error state, the job continues processing in another path in the workflow instead of staying in the Error state. You can define a branch out of any step in the workflow.
To define an error path in a workflow:
  1. Click the Workflow tab.
  2. Click the name of the workflow you want to modify.
  3. Optional: Disable the workflow by clicking the switch to the left of the workflow name.
    If you do not disable the workflow while you edit it, jobs that use this workflow continue to move through steps. When you save, the workflow is momentarily disabled then enabled again. Jobs that are processing in the workflow could move into error.
  4. Find the step you want to create an error path for.
  5. Add the step that you want the error branch to take.
  6. Draw a connector from the step where the error could occur to the step that you want to execute when the error happens.
  7. Right-click the connector you just drew and select Properties.
  8. Add a rule for when the job goes into error:
    1. Type the Rule name to define the new rule.
      We recommend giving the rule a name that identifies the branch as an error path, such as If error. You see the name next to the connector on the workflow editor
    2. To specify the condition to test for the error state, set Property to Current job state, Comparison to is (=), and Value to Error.
        Note:
      • Error is the only value for the Current job state property that can be used in a rule.
    3. Make sure that the Order of execution value is set appropriately for the error path. If other conditions are met before the error path, the job might not take the path you intended.
  9. Add any other conditions that you want to use to evaluate when to take the error path.
  10. Click OK.
  11. Repeat this procedure to add more error paths. Multiple error paths can exist in one workflow.
  12. Save and enable the workflow.
  13. Enable the workflow and test it to make sure that the rules in the branch work in the way you expect. Submit jobs that are sent through all the paths. When a job takes the error path, it moves out of the Error state, so you must find another way to look for jobs instead of searching for the Error state.
      Note:
    • When the job goes into the Error state, files in the /tmp directory under the spool directory for the job are moved to an /error directory. When they are moved, the step name and phase name are prepended to the file names.