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 a user-specified error message.

ComponentSame input metadataSorted inputsInputsOutputsEach to all outputsJavaCTLAuto-propagated metadata
Fail
no
no
0-10
no
no
yes
no

Ports

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

Metadata

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.

Fail Attributes

AttributeReqDescriptionPossible values
Basic
Error messageno

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
Mappingno

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.

 

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 details

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.

    [Note]Note

    Only output dictionary entries can be changed.

Example of mapping for the Fail component

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.

See also

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