How Can I Abort a Flow If an Error Occurs? (Magic xpi 4.6)
Magic xpi lets you define the error policy for a specific error code or a range of error codes. These error policies tell Magic xpi what to do if and when an error occurs. You can instruct Magic xpi to abort a flow. This is done through the Error Policies tab (as shown in the image below).
Aborting a flow when an error occurs:
-
Open the Error Policies tab by double-clicking on Error Policies under the relevant flow in the Solution Explorer.
-
Click Add.
-
Click to the right of the From column to open the Errors Repository.
-
Select an error entry to serve as the start of your error range, and then click OK. After you have done this, the Component column will display the name of the component belonging to the selected error.
-
Click to the right of the To column to open the Errors Repository.
-
Select an error entry to serve as the end of your error range, and then click OK.
-
You can set the error policy for a single error code by entering the same number in the To column that you entered in the From column.
-
In the Error Policy column, select Abort. This is the behavior that you want the Server to execute if the flow returns the error codes that you defined above.
-
Click Save to save your new error policy.
Now, if an error occurs within the error range that you defined, the flow will abort.