Constant Service (com.ibi.agents.XDConstantAgent)

Syntax:

com.ibi.agents.XDConstantAgent

iIT Service Object:

misc: Constant Agent

Description:

Replaces the input document with a constant document. Because all parameters are evaluated with the iWay Functional Language (iFL), this service is frequently used to modify the input or load a file from a disk, and so on.

Parameters:

Parameter

Description

Constant Output To Emit *

The value that will be emitted by the Constant service. If the Output Format parameter value is set to xml, this value needs to be valid XML, otherwise the original input document can be emitted based on the Input Criterion parameter value.

Output Format *

The output format of the result.

Select one of the following values from the drop-down list:

  • xml (default). This value emits a valid XML output.
  • flat This value emits output as flat text.

Output as Error

Determines whether the input should be emitted as an error document. Select true or false (default) from the drop-down list.

Input Criterion

Emit status criteria based on input type, else copy. Select one of the following values from the drop-down list:

  • always (default). Emits the constant regardless of the input document's format.
  • xmlonly. If the input document is XML, emit the constant, otherwise emit the original input document.
  • flatonly. If the input document is flat, emit the constant, otherwise emit the original input document.

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.

Edges:

The edges returned are listed in the following table.

Edge

Description

success

Successful.

fail_parse

An iFL expression could not be evaluated.

Example:

If you run this service using any input document, the same constant document output is returned. For example, if you are using <a>aaa</a> as a constant, the following is the result:

<?xml version="1.0" encoding="UTF-8" ?>
<a>aaa</a>