Throw error handling in Adobe Workfront Fusion
In some cases, you may want to forcibly stop the scenario execution followed by Rollback or Commit phase or to stop the processing of a route and optionally store it in the queue of incomplete executions.
Currently the error handling directives cannot be used out of the scope of an Error handler route and Adobe Workfront Fusion does not offer a module that would enable you to easily conditionally generate (throw) errors.
For information on incomplete executions, see View and resolve incomplete executions in Adobe Workfront Fusion.
For information on error handling directives, see Directives for error handling in Adobe Workfront Fusion.
Access requirements
You must have the following access to use the functionality in this article:
To find out what plan, license type, or access you have, contact your Workfront administrator.
For information on Adobe Workfront Fusion licenses, see Adobe Workfront Fusion licenses
Workaround for Throw
To conditionally throw an error, you can configure a module to make it optionally purposely fail during its operation. One possibility is to employ the JSON > Parse JSON module (see JSON modules), configured to optionally throw an error (BundleValidationError in this case):
You can then attach one of the error handling directives to the error handling route to:
- Force the scenario execution to stop and perform the rollback phase: Rollback
- Force the scenario execution to stop and perform the commit phase: Commit
- Stop the processing of a route: Ignore
- Stop the processing of a route and store it in the queue of incomplete executions folder: Break
The following example shows the use of the Rollback directive: