Category: Transaction
Behavior is similar to Java "try-catch", without support for "finally".The main node is executed If an exception occurs during the execution of the main node.All the catch nodes are checked from left to right, i.e. in the same order in which they were added to the workflow, until a matching catch node is found, after which checking of remaining catch nodes is abandoned.If the catch node being checked has the same exception type as that of the actual exception that has occurred.(Super classes of the catch nodes exception type are also included in this matching). That catch node is executed .This catch node would execute all its child nodes and then return.If the exception does not match the exception types of any of the catch nodes . The exception is thrown again, as it was received .In this case either the exception will be caught at the next higher try-catch activity, or if this was the highest try-catch activity, the workflow instance will be terminated
Properties
Name | Description | Mandatory | Initial Value | Runtime Expression | Type | Conditional | |
---|---|---|---|---|---|---|---|
NodeType | Contains the type for node | No | No | No | Output | No | |
Data Type: Text | Comments: | ||||||
Name | Name of the workflow node | Yes | Yes | No | Input | No | |
Data Type: Text | Comments: | ||||||
Description | Description of the workflow node | No | Yes | No | Input | No | |
Data Type: Text | Comments: | ||||||
LogData | Any string to output to the workflow log | No | No | No | Input | No | |
Data Type: Text | Comments: |
Note |
---|
For an example of this Activity, please review this article for a full Walkthrough. |
Comments
2 comments
Hi team,
it seems that if you use throw (not sure if the same happens for not manually generated exception) in a loop, only the first exception is captured by the catch.
All subsequent exceptions in the loop seem to make the try end but the workflow doesn't execute the catch branch.
Thanks,
Marco
Hi Marco,
If you throw an error inside a loop, it will break out of the loop and subsequent loop iterations will not execute. The error will be handled by the inner-most executing Try-Catch assuming you have one, if no Try-Catch is present then workflow execution will terminate with your exception.
If you wish to abort the processing of the current iteration of the loop but not break out of the loop itself, just continue onto the next iteration, the correct activity to use would be GeneralContinue.
If you wish to abort the processing of the entire loop, the correct activity to use would be Break-While or GeneralBreak.
If you wish to throw an error and abort processing entirely, then that is where you should use Throw exception.
Thanks,
Dan
Please sign in to leave a comment.