Configuring an Internal Emit Service

How to:

Reference:

Messages are sent to particular destinations at the completion of a workflow. The state of the document determines which particular destination is used. The order in which the destinations are used cannot be predicted.

To route an output document or error message to a protocol other than that of the listener destination, you must configure an emit service in your application or an emitter as part of the Channel Outlet. For example, an application can receive input over FTP, but want to route the output to an Internal Queue listener.

The associated emit service is used to place messages onto the internal queue. Enter the name of the queue as the destination. The queue you specify must be an Internal Queue listener that has already been defined.

It is also possible to emit to multiple queues in a single emit operation. To do this, list the queues, separated by commas (,). For example, internalqueue1, internalqueue2, internalqueue3. This will emit to three queues, which are handled by three Internal listeners.

For a complete description of the configuration parameters that are available for the Internal emit service, see Internal Emit Service Parameters.

For a complete description of the edges that are returned by the Internal emit service, see Internal Emit Service Edges.

Procedure: How to Configure an Internal Emit Service

To configure an Internal emit service, you must create a process flow in your application project using iWay Integration Tools (iIT) and use the Queue (Out) object from the Palette, under Connectors, to emit to the internal queue (iWay queue - send a message) action.

Note: The Queue Out object implements the iWay queue - send a message action using the Internal emit service (com.ibi.agents.XDInternalEmitAgent).

  1. Expand the Connectors category in the Palette and drag the Queue (Out) object to your process flow, as shown in the following image.
  2. In the Properties tab, under Configuration, select iWay queue - send a message from the Select Action drop-down list, as shown in the following image.
  3. Click the Create a configuration icon to the right of the Configuration field to configure a new generic for this object, as shown in the following image.

    The New Generic dialog box opens, as shown in the following image.

  4. Specify a name for this generic in the Generic Name field, or accept the default.
  5. In the Queue Settings tab, specify values for the following configuration parameters:
    • Name. Name of the internal queue for which to post messages.
    • Priority. Priority is an integer between 0 and 9, inclusive. The lowest priority is 0. The highest, most expedited priority, is 9. The default value is 4.
    • Put Timeout. Time, in milliseconds, to wait for the queue to become available when attempting to put a message on the queue. You can enter zero (0) for an unlimited wait, but this is not recommended. If no value is supplied, timeout will be set to 3000 milliseconds.

    The Registers (Sent) tab is shown in the following image.

    By default, the Apply parameter is set to false. User registers are processing variables and their values. If you want these registers to be emitted with the message, set this to true. In resubmit operations, this is set to false.

    The Namespace parameter in this tab is used for synchronous or asynchronous processing. A namespace or list of namespaces containing registers will be made available to the Internal Queue listener. Select Default Namespace from the drop-down list for all registers in default (no prefix), None to send no registers, or All for registers from all namespaces. The default value is none.

    The Registers (Returned) tab is shown in the following image.

    In synchronous processing, registers set by the Internal Queue listener in the return namespace will be made available to the calling process. If a value is supplied for the Namespace parameter in this tab, then response registers will be copied to the specified namespace. Leave this parameter blank to store response registers in the return namespace.

  6. Click Finish.

    You are returned to the Properties tab.

  7. Expand Queue Settings, as shown in the following image.
  8. Specify values for the following configuration parameters:
    • Respect Transactionality. Determines whether to respect existing transactionality. The default value is true.
    • Timeout. Determines how many seconds to wait for synchronous response. Set to zero (0) or leave blank to wait indefinitely. The default value is 0.
  9. Expand Post Action, as shown in the following image.
  10. Specify a value for the following configuration parameter:
    • Return. Select one of the following options from the drop-down list:
      • status. The status document will be the output document. This is the default value.
      • input. The input document will become the output document.
  11. Save your process flow.

Reference: Internal Emit Service Parameters

The following table lists and describes parameters for the Internal emit service.

Note: Parameters that are common to emit services are described in Service Configuration Parameters.

Parameter

Description

Queue Name (required)

Name of the internal queue for which to post messages.

Want User Registers

User registers are processing variables and their values. If you want these registers to be emitted with the message, set this to true. In resubmit operations, this is set to false. The default value is false.

Priority

Priority is an integer between 0 and 9 inclusive. The lower Priority is 0. The highest most expedited priority is 9. The default value is 4.

Put Timeout

Time, in milliseconds, to wait for the queue to become available when attempting to put a message on the queue. You can enter 0 for an unlimited wait, but this is not recommended. If no value is supplied, timeout will be set to 3000 milliseconds.

Request Context Namespace

For synchronous or asynchronous processing, namespace or list of namespaces containing registers that will be made available to the Internal Queue listener. Select Default Namespace for all registers in default (no prefix) or None to send no registers at all. Enter an asterisk (*) for registers from all namespaces. The default value is default.

Response Context Namespace

In synchronous processing, registers set by Internal Queue listener in the return namespace will be made available to the calling process. If a value is supplied here, then response registers will be copied to the specified namespace. Leave this parameter blank to store response registers in the return namespace.

Return (required)

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

  • status. The status document will be the output document. This is the default value.
  • input. The input document will become the output document.
  • response. Awaits synchronous output from the Internal Queue listener.

    Note: The response option is not compatible with local transactions.

Timeout

Determines how many seconds to wait for synchronous response. Set to 0 or leave blank to wait indefinitely. The default value is 0.

Reference: Internal Emit Service Edges

The following table lists and describes the edges that are returned by the Internal emit service.

Edge

Description

OnSuccess

Operation was successful.

OnFailure

Fail condition occurred during execution.

OnError

Exception occurred during execution.

OnParseError

Could not parse a document.

OnNotFound

Resource was not found. This may or may not be a failure.

OnTimeOut

Operation timed out.

OnCancelled

Service has responded to a cancellation request.

OnNotFound

Resource was not found and this is considered an error.

OnFailedOperation

Could not perform the operation requested.