Overview for creating new senders

Senders are transport-specific. WebSphere Partner Gateway ships with senders for FTP/S, JMS, File, SMTP, and HTTP/S transports. To add a new capability to the WebSphere Partner Gateway system, such as a WAP transport, you can write your own senders, using an API provided with WebSphere Partner Gateway. 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 WebSphere Partner Gateway 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.

  1. 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, and then invokes the Sender Framework to send the document to the target trading partner.
  2. Preprocess From the gateway configuration, the Sender Framework determines the configured preprocessing handlers. These handlers, which have been configured for this gateway, can be user-defined or supplied by WebSphere Partner Gateway. 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 invoked to preprocess the document.
  3. Initialize the sender The Sender Framework determines the sender for this gateway. It initializes the sender by calling its init method. The sender initializes itself with the gateway configuration.
  4. 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.
  5. 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.
  6. Postprocess From the gateway configuration, the Sender Framework determines the configured postprocessing handlers. These handlers, which have been configured for this gateway, can be user-defined or supplied by WebSphere Partner Gateway. 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 invoked to postprocess the response.
  7. 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 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.

Copyright IBM Corp. 2003, 2005