Fail Service (com.ibi.agents.XDFailAgent)

Syntax:

com.ibi.agents.XDFailAgent

Description:

The failure business service always returns an XDException. If the retry option is selected for the Type of failure parameter, the exception calls for a retry of the input, if possible. This service is useful when debugging rollback logic in a customer business service.

Parameters:

Parameter

Description

Type of failure

The type of failure to be thrown. Select one of the following options from the drop-down list:

  • fail
  • retry

Message

Message to be issued to the user.

Bypass Error Message

Indicates not to trace at the error level when this service terminates the process. This is useful for cases where the trace log is being monitored by an external program for errors. The termination will be traced at the debug level.

Call at EOS?

In a streaming environment, EOS (End of Stream) is the short message that is sent after the last document, which signifies the EOS. This parameter determines whether this service should be called for the EOS message. The default value is false.

Example:

This service can be used in situations where a failure must be reported or simulated (for example, if a certain fatal condition is reported). If you run this service in a process flow using <test/> as the incoming message and the retry option is selected for the Type of failure parameter, the following document is returned:

<?xml version="1.0" encoding="UTF-8" ?>
<eda>
  <error code="6" timestamp="2009-06-05T19:56:59Z"
  source="com.ibi.agents.XDFailAgent" stage="AGENT">XD[RETRY] cause: 0
  subcause: 0 message: Retry requested from XDFailAgent</error>
</eda>

Otherwise, a retry is silent and the incoming message is retried later.

If the fail option is selected for the Type of failure parameter, the process flow handles the termination as an error condition by searching upward on the execution edge to locate a catch node. If none is found, then the process flow is terminated. If a catch node is found, then standard catch logic is performed.

It is not recommended to design process flows in which failure indications are used to control execution logic (for example, simulating a long jump). Failure indications should only be used in the event of actual failures.


iWay Software