The article describes the difference between Go Forward/Go Backward and Go to Label options in Resume action and provides an explanation on when and how to use Go Forward/Go Backward options. Please note that Resume action can only be used in an Error Task.
Read this article on how to set up an Error task.
Go to Label - Continue at a specific Label in the task where the error occurred. If this option is selected, you will be required to specify the name of the Label where the Project should resume
Go Forward - Continue forward to a specific Label in the project. Unlike the Go to Label option, the Go Forward option is not restricted to a Label in the Task in which the Error occurred
Go Backward - Rewind backward to a specific Label in the project. Unlike the Go to Label option, the Go Backward option is not restricted to a Label in the Task in which the Error occurred
Based on the description above, the key difference between Go to Label and Go Forward/Go Backward is that Go to Label option cannot be used when you wish to move from one task to another, while Go Forward/Go Backward options allow you to do that.
It is important to understand that in order to use Go Forward/Go backward options you need to have your script structured so that Foxtrot tracks the order the tasks are run. In other words, Foxtrot needs to be able to go back/forward through the sequence of the tasks. The important part here is where the Run Task action is placed. If in the error task you have a Go Backward option, it will go back through that order to find the Label that is before the Run Task action that leads to the task with the action that fails, and if you have Go Forward option, it will go through that order to find the Label that is after the Run Task action that leads to the task with the action that fails.
The example of using Go Forward/Go Backward options is shown below.
- In the Task 0 there is Run Task 1 action that leads to the Task 1. There are two labels – Backward (before Run Task action) and Forward (after Run Task action).
- In the Task 1 there is Run Task 2 action that leads to the Task 2 that has an action that fails. There are two labels – Backward (before Run Task action) and Forward (after Run Task action).
So, the project flow looks like this: Task 0 -> Task 1 -> Task 2 (action that fails) -> Error Task
- In the Error Task Go Forward option is selected. The script will continue running from the label ‘forward’ in Task 1 (it can also be label ‘forward’ in Task 0 – any task that Foxtrot is able to track)
Now that Error Task is set, the script from the example will run as following: run Task 0 –> Go to Task 1 –> Go to Task 2 –> An error occurs –> Go to Error Task –> Run Resume action –> Go to label ‘forward’ in Task 1 –> Finish running Task 1 –> Go to Task 0 –> finish running the script.
The picture below shows two scenarios of using Go Forward/Go Backward options:
Comments
0 comments
Please sign in to leave a comment.