Overview

In this section:

The Internal Listener can operate on messages either synchronously or asynchronously. An asynchronous operation does not return any status to the caller and simply proceeds with its normal operation. In synchronous mode, the caller awaits completion of the message execution, and can act upon the document and status returned.


Top of page

x
Asynchronous Mode

The Internal Listener can be used asynchronously by configuring an Internal Emit Service. When used asynchronously, the message to be operated upon is deposited in the named queue and the Internal Emit Service returns it to the flow, passing the appropriate edge, either success or fail_operation. The service can not obtain any information pertaining to the execution of the document.


Top of page

x
Synchronous Mode

The Internal Listener can be used synchronously using settings in the Internal Emit Service. In synchronous mode, the calling service waits for the information to be returned from the called internal channel, or a timeout. When used in synchronous mode, persistent settings of the Internal Listener are ignored and no request will be persisted. However, the synchronous user can pass context information to the Internal Listener and can receive the result of the call.

Edge Name

Description

success

The called channel reported all operations as successful.

fail_operation

The called channel reported failure.

notfound

The requested internal channel was not found at the time the call was attempted.

timeout

The timeout period has expired.

cancelled

A request was made to cancel the operation. Usually this is the result of the flow itself timing out or another portion of the calling flow requesting that the operation be cancelled.

<Special name>

The name passed from the called channel under the name return.edgename.

To pass a register set into the called channel's execution, specify a list of the register namespaces that are to be passed. This is done in the Emit Headers parameter, and it can be a standard list. The registers are visible to the called process flow on the internal channel exactly as they are in the calling flow. Copies are passed, so that any changes made do not affect the caller.

The current document is passed to the called channel listener for execution.

The process on the internal channel returns the result document, along with specific information needed by the caller. It does this by creating special registers in the return namespace. For example, return.statuscode. The Internal Emit Agent maps the registers in the return namespace to a specified response namespace for access in the calling process, for example called.statuscode.

The called process can also instruct the caller to return the result document on a named edge. The called process does this by setting the special return.edgename special register to the name of the edge to be followed by the calling process. This edge name is in addition to the success edge.


iWay Software