Overview for creating new senders
Senders are transport-specific. WebSphere Business Integration
Connect ships with senders for FTP/S, JMS, File, SMTP, and HTTP/S
transports. To add a new capability to the Business Integration
Connect system, such as a WAP transport, you can write your own
senders, using an API provided with the 4.2.2 release. You can use
the Community Console to associate these new senders with transports
and integrate them into the processing flow. This
section describes the process of developing a new sender in the
following topics:
The Sender/Sender
Framework flow
The nature of the processing flow on the sender side of
Business Integration Connect is in part dictated by the needs of
the particular situation and transport, but certain basic tasks
must always be done. This section describes those tasks at a high
level.
- Deliver: After processing the document,
the Business Processing Engine (BPE) delivers it to the delivery
manager. The delivery manager determines the configured "To" gateway
for the participant connection associated with this document flow.
It then invokes the sender framework to send the document to the target
trading partner.
- Preprocess: From the gateway configuration,
the sender framework determines the configured preprocessing handlers.
These handlers, which have been configured for this gateway, can
be either supplied by Business Integration Connect or user-defined.
The document is passed as input to the first handler, the returned
processed document is fed as input to the next handler, and so on
until one of the handlers accepts it. This handler is then invoked
to preprocess the document.
- Initialize the sender: The sender framework
determines the sender for this gateway. It then initializes the
sender by calling its init method. The sender initializes itself with the gateway configuration.
- Send the document: The Framework calls
the sender's send method. The sender creates a SenderResult object to store
transmission and status information and sends the message, using
the destination specified in the gateway configuration.
- Set synchronous response: The
GET_SYNC_RESPONSE attribute can be set on the business document
by any of the workflow steps and the handlers. If the GET_SYNC_RESPONSE
attribute on the business document is set to true, the sender can obtain the response business document synchronously.
It stores the response business document on the file system. The
sender constructs SenderResult and updates it appropriately with
the transmission status, message, and response details.
- Postprocess: From the gateway configuration,
the sender framework determines the configured postprocessing handlers.
These handlers, which have been configured for this gateway, can
be either supplied by Business Integration Connect or defined by
the user. SenderResult is passed as input to the first handler,
the returned SenderResult document is fed as input to the next handler, and
so on until one of the handlers accepts it. This handler is then
invoked to postprocess the response.
- Process the response: The sender framework
processes the response, appropriately updating the status of the
request business document that was sent. If the sender obtained
a business document response, the sender framework introduces the
business document into the system. This business document flows through
the system like any other business document.
Sender architecture
Sender development is based on two major parts:
- The sender itself, represented in the API by the SenderInterface interface
- SenderFramework, a class that Business Integration
Connect supplies to manage the sender
The sender is responsible for actually sending the message to the
destination, and for creating and initially populating the SenderResult
object. In the case of a synchronous request, the sender also writes
the response document to a file and places a reference to the File
object in the SenderResult object. The Framework is responsible
for preprocessing and postprocessing documents and for instantiating
and utilizing the sender.
