The component is located in→ .
The Fail component aborts the parent job (jobflow or graph) with a user-specified error message.
|Component||Same input metadata||Sorted inputs||Inputs||Outputs||Each to all outputs||Java||CTL||Auto-propagated metadata|
|Input||0||Any input token from this port interrupts the jobflow (or graph).||Any|
The input field errorMessage is automatically used for a user-specific error message, which interrupts the job, if it is not otherwise specified in mapping.
In case the job is interrupted, an exception is thrown with this error message. The error message can be dynamically changed in mapping.
|"user abort" (default) | text|
Mapping is used for dynamic assembling of an error message, which is thrown in case the job is going to be interrupted. Moreover, dictionary content of interrupted job can be changed as well. See Details.
Fail interrupts a parent job (jobflow or graph). The first incoming token to the component throws an exception (org.jetel.exception.UserAbortException) with a user defined error message. The job finishes immediately with a final status ERROR. Moreover, the dictionary content can be changed before the job is interrupted. In general, the component allows to interrupt the job and return some results through the dictionary, at the same time.
The Fail component works even without an input port attached. In this case, the job is interrupted immediately when the phase with the Fail component is started up.
Mapping in the Fail component is generally used for two purposes:
Assembling of an error message from an incoming record.
Populating dictionary content from an incoming record.
Only output dictionary entries can be changed.
Figure 59.2. Example of mapping for the Fail component
The error message compiled by the mapping has the highest priority. If the mapping does not set errorMessage, the error message from the component attribute is used instead. If even this attribute is not set, predefined text user abort is used instead.