Fail

Not available in Community Designer

Short Description
Ports
Metadata
Fail Attributes
Details
See also

The component is located in PaletteJob Control.

Short Description

The Fail component aborts the parent job (jobflow or graph) with user-specified error message.

Component Same input metadata Sorted inputs Inputs Outputs Each to all outputs Java CTL Auto-propagated metadata
Fail
no
no
0-10
no
no
yes
no

Icon

Ports

Port typeNumberRequiredDescriptionMetadata
Input0
no
Any input token from this port interrupts the jobflow (or graph).Any

Metadata

Input field named 'errorMessage' is automatically used for user-specific error message, which interrupts the job, if it is not specified in mapping other way.

Fail Attributes

AttributeReqDescriptionPossible values
Basic
Error messageno In case the job is interrupted, the exception is thrown with this error message. The error message can be dynamically changed in mapping. "user abort" (default) | text
Mappingno Mapping is used for dynamical assembling of 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.  

Details

Fail interrupts parent job (jobflow or graph). First incoming token to the component throws exception (org.jetel.exception.UserAbortException) with user defined error message. The job finishes immediately with 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 at the same time return some results through dictionary.

The component Fail works even without input port attached. In this case, the job is interrupted immediately when the phase with the Fail component is started up.

Mapping details

Mapping in Fail component is generally used for two purposes:

  • Assembling of error message from incoming record.

  • Populating dictionary content from incoming record.

    [Note]Note

    Only output dictionary entries can be changed.

Example of mapping for Fail component

Figure 57.2. Example of mapping for Fail component


Error message compiled by the mapping has the highest priority. If the mapping does not set 'errorMessage', the error message from component attribute is used instead. If even this attribute is not set, predefined text "user abort" is used instead.

See also

Common Properties of Components
Specific Attribute Types
Common Properties of Job Control
Job control Comparison