This section describes, in more detail, the components of WebSphere Business Integration Connect and shows you the various points at which you can change the system-supplied behavior of the components for processing a business document.
You use handlers to change the system-supplied behavior of targets, gateways, fixed workflow steps, and actions. There are two types of handlers--those supplied by WebSphere Business Integration Connect and those that are user-defined. See the Programmer Guide if you want information on creating handlers.
The sections that follow describe the processing points at which you can specify handlers.
Targets have three configuration points for which handlers can be specified--Preprocess, SyncCheck, and Postprocess.
Preprocessing is generally used for any processing on the document (for example, splitting the document) that needs to be accomplished before the document is sent to the shared file system.
SyncCheck is used to determine whether the document is synchronous or asynchronous. WebSphere Business Integration Connect supplies the following handlers for synchronous checking:
As you can see from the naming convention, the first four handlers are specific to the four transports that can be used for synchronous transactions. Any request that uses the DefaultAsynchronousSyncCheckHandler will be treated as an asychronous request. Any request that uses the DefaultSynchronousSyncCheckHandler will be treated as a sychronous request.
Postprocessing is used for processing the response document that is sent as the result of a synchronous transaction.
For the HTTP/S transport and for user-defined transports, you can add handlers to be called at the three configuration points available for targets. In the case of AS2, cXML, RNIF, and SOAP documents, you must specify the SyncCheck handler. This is described in Modifying configuration points.
When you select a configuration point during the creation of an HTTP/S or user-defined target, you see two lists of handlers: a Configured List and an Available List. The Configured List shows any handlers that have been configured for the target. The Available List shows any handlers that can be used to configure the target.
You manipulate the handlers in the Configured List by highlighting a handler and using the control buttons (such as Move Up or Move Down).
The following illustration shows the list of available handlers for the SyncCheck configuration point.
You can add your own handler to the handlers supplied by the system by uploading a user-defined target handler. You use the Import choice of the Handlers List page to upload a user-dined handler.
When you upload a user-defined target handler, the handler is added to the Handlers List. It also appears on the Available List for the type of configuration point to which it pertains.
You can move handlers from the Available List to the Configured List, you can remove handlers from the Configured List, or you can rearrange the order of the handlers.
When a document is sent, by the Target, to the shared file system, the Document Manager is triggered to pick up that document for processing. All document processing, regardless of the packaging, protocol, and document flow, involves the use of fixed inbound workflow steps, one or more actions (variable workflow steps), and a fixed outbound workflow step.
The Inbound Fixed Workflow consists of two steps that unpackage the protocol and parse the document. For example, if an AS2 message is received, the message is decrypted, and the sender and receiver business IDs are retrieved.
The inbound fixed workflow steps convert the AS2 document into plain text for further processing by WebSphere Business Integration Connect and extract information so that the action for the message can be determined.
The business protocol of the document determines how the two steps retrieve this information. At minimum, the document or message must include the sender and receiver IDs and the document flow definition (package, protocol, and document flow).
You can use the default handler that applies to the protocol for your document, or you can specify a different handler for the fixed workflow step.
After you click the magnifying glass icon, you see the handlers that you can select for each of the inbound fixed workflow steps:
The fixed workflow steps that are preconfigured with the system are shown in the Configured List. You cannot modify these steps; however, you can add business logic to the steps by adding handlers.
To add user-defined handlers for a fixed inbound workflow step, you upload the file representing the handler. After the file has been uploaded, it appears on the Available List of handlers, and you can add it to the Configured List.
The next step in the processing sequence occurs based on the actions that have been set up for the document exchange. Actions consist of a variable number of steps that can be performed on the document. Examples of actions are validation of a document (so that it conforms to a particular set of rules) and transformation of the document to the format required by the recipient.
If the document has no specific steps required, it can use the system-supplied Pass through action, which makes no changes to the document.
The way handlers are processed for actions is different from the way they are processed for targets, gateways, and fixed workflows. For actions, all handlers in the Configured List are called, and all are used in the order in which they appear on the list.
The Outbound Fixed Workflow consists of one step--the packaging of the document with its protocol information. For example, if this document has been set up to be received by a back-end application using Backend Integration packaging, certain header information is added to the document before it is passed to the gateway.
You can view the system-supplied outbound workflow steps by selecting Hub Configuration > Fixed Workflow > Outbound. To upload a user-defined handler to add to the list of system-supplied handlers, you select Hub Configuration > Handlers > Fixed Workflow and then select Import to upload the user-defined handler.
After the document leaves the Document Manager, it is sent, from the Gateway, to the intended recipient. The Gateway has two configuration points--pre-process and post-process.
Preprocess affects the processing of a document before it is sent to the recipient. Process is the actual sending of the document. Postprocess acts on the results of the document transmission (for example, on the response it receives from the recipient during a synchronous transmission).
There are no requirements to set up configuration handlers for any WebSphere Business Integration Connect-supported protocols when you define a gateway (as there are in the case of certain business protocols used in synchronous transactions when you set up targets).
As you set up targets, gateways, and document flows in the next few chapters, you will see how you can (or must) specify a handler for a specific configuration point. If you are going to apply user-defined handlers to the configuration points, you must first upload the files representing those handlers into the hub. This is described in Uploading user-defined handlers.