IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > IBM i > Overview of WebSphere Adapter for IBM i > Technical overview

Inbound processing

Inbound processing refers to the actions taken by the adapter when polling an IBM i Data queue for new messages. The adapter removes the messages from the queue, places them in a staging queue, converts the messages into the business objects, and delivers the business objects to the client application.

Inbound processing enables a client application to receive a notification when an object is put on an IBM i Data queue. Figure 1 illustrates the flow of inbound processing. An IBM i application places data on a queue. Periodically, the adapter polls the queue, retrieves messages and processes events, and then delivers the events to a client application that runs in IBM BPM or WebSphere Enterprise Service Bus or Process Administrative Console.

Figure 1. Overview of inbound processing

During each polling interval, the adapter processes a configurable number of messages on the polled queue. For each message, the adapter takes the following actions:

  1. Reads a message from the data queue. From a first-in first-out (FIFO) queue, the adapter fetches the oldest message. From a LIFO queue, the adapter fetches the most recent message.
  2. Saves the message in the staging queue, to prevent its loss in case of a failure.

  3. Creates an event, which records the processing status of the message in the staging queue. If the adapter is configured for assured-once processing, the event is stored in a persistent table called the event store. Otherwise, the events are stored in memory on the underlying application server where adapter is deployed with the event ID being the key of the message in the staging queue.

  4. Processes the event in the event store or memory and delivers it to the client application. To deliver an event, the adapter creates a business object for each message retrieved from the polling queue.
  5. Removes the event from the event store and the message from the staging queue after the event is delivered.

To perform inbound processing, you must take the following actions before you deploy the adapter:

You can customize the way the adapter processes events when you use the external service wizard to configure the adapter or at a later time by using the Process Administrative Console of the server to change the activation specification properties.

For example, you can specify how often the adapter polls for events and how many events it retrieves during each polling period.

Before you can create data queues, you must copy the control language (CL) program in the adapter installation directory to the IBM i system. The CL program is run on IBM i server to transfer the data to DTAQ. The adapter provides sample scripts CL programs I5INBOUND.SAVF and I5ARCHFAIL.SAVF for creating data queues. The CL programs contains the source code CL (.CLLP files) along with the compiled code program (.PGM). These CL programs are in the WID_installation_dir/ResourceAdapters/IBMi_version/samples/scripts directory, where WID_installation_dir is the installation directory for IBM Integration Designer, and version is the version of the adapter, for example, 7.5.


Assured-once delivery of events

The adapter provides a recovery feature called assured-once delivery of events for inbound processing in case of abrupt termination. Assured-once delivery is a way to make sure that events are delivered once, and only once, to the export in the case of a failure. During event processing, the adapter persists the event state in an event store on the data source. Before the event store can be created, the data source must be created in IBM BPM. To use the recovery feature provided by IBM BPM, you set the AssuredOnceDelivery property in the activation specification to true. This recovery feature is enabled by default.

The adapter also provides for event persistence using an in-memory representation of the event store. When you use this feature, you do not need to create a JNDI data source or an external event store, and event processing is faster. However, with this feature there is no support for event recovery. If the server fails, the in-memory event stores are lost. To prevent the loss of events in the case of server failure, the recommended approach is to use the database event store.

To use the in-memory event persistence capability of the adapter, you must set the AssuredOnceDelivery property to false, or the adapter will log a warning message.

Technical overview of WebSphere Adapter for IBM i


Related tasks:

Configure the module for inbound processing


Related reference:

Activation specification properties