Category: Transaction
This activity can be used to throw a checked or runtime exception from the workflow instance .If the ExceptionObject property contains a valid Java Throwable object instance .An exception is thrown using the exception object in this property.Else A new Throwable object of the class name specified in the ExceptionType property is created .Its exception message is set to the value of the ExceptionMessage property ii. An exception is thrown using this exception object .If the ExceptionType property does not contain the name of a valid Java class which is derived from Throwable.A workflow engine exception is thrown
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: | ||||||
ExceptionType | The fully qualified class name of the exception that is to be thrown | No | Yes | Yes | Input | No | |
Data Type: Text | Comments: | ||||||
ExceptionMessage | The message of the exception that is to be thrown. This property is used only if the ExceptionObject property does not contain a valid Java throwable object, and the ExceptionType property contains a class name | No | Yes | Yes | Input | No | |
Data Type: Text | Comments: | ||||||
ExceptionObject | The exception object that needs to be thrown. This must be of a class derived from Throwable. This property may be left empty, if both, the ExceptionType and ExceptionMessage, have been specified | No | No | Yes | Input | No | |
Data Type: Java Object | Comments: | ||||||
LogData | Any string to output to the workflow log | No | No | No | Input | No | |
Data Type: Text | Comments: |
Comments
4 comments
Hi Mark,
where can we find the types of throwable objects?
Basically I would like to have some example of strings we can add in the ExceptionType property.
Thanks,
Marco
Hi Marco,
There are hundreds of exception types, both inside the Adaptiva libraries and outside of the Adaptiva libraries, it would be impossible to provide a list. I would recommend running your workflow and if you encounter a specific exception that you want to handle differently to any other exception, you copy and paste the exception type. For the majority of scenarios, the default 'Throwable' catch should be sufficient for error handling as this will trap any unhandled exception.
Thanks,
Dan
Hi Dan,
I wanted to use the action "Throw Exception", however it requires an exceptionType.
I used the null exception that "Luckily :)" I could copy from a workflow log.
Are those standard JAVA classes? If so I can google them.
Thanks
Hi Marco,
An example generic error that you can use to throw would be java.lang.Throwable. They are standard java classes though so you're welcome to google possible errors.
Thanks,
Dan
Please sign in to leave a comment.