Business object requests are processed when InterChange Server sends a business object to the doVerbFor() method . Using the configured data handler, the adapter converts the business object to an WebSphere MQ message and issues it. There are no requirements regarding the type of business objects processed except those of the data handler.
The adapter processes business objects passed to it by a collaboration based on the verb for each business object. The adapter uses business object handlers and the doForVerb() method to process the business objects that the adapter supports. The adapter supports the following business object verbs:
The processing of business objects with the create, update, and delete verbs will depend on whether the objects are issued asynchronously or synchronously.
The default delivery mode for business objects with create, update, and delete verbs is asynchronous. A message is created from the business object by using a data handler and then it is written to the output queue. If the message is delivered, the adapter returns BON_SUCCESS, else BON_FAIL .
If a replyToQueue has been defined in the connector properties and a ResponseTimeout exists in the conversion properties for the business object, the adapter issues a request in synchronous mode. The adapter then waits for a response to verify that appropriate action was taken by FRONT ARENA.
The adapter initially issues a message with a header as shown in the
following table.
The message header described in Table 2 is followed by the message body. The message body is a business object that has been serialized using the data handler.
The Report field is set to indicate that both positive and negative action reports are expected from FRONT ARENA. The thread that issued the message waits for a response message that indicates whether FRONT ARENA was able to process the request.
When FRONT ARENA receives a synchronous request from the adapter, it
processes the data of the business object and issues a report message as
described in the following tables.
Table 3. Response message descriptor header (MQMD)
Field
| Description | Value |
---|---|---|
The format name.
|
The input format of busObj as defined in the conversion
properties.
| |
The message type.
|
MQMT_REPORT*
| |
* Indicates a constant that is defined by IBM.
|
Table 4. Population of response messages
Verb | Feedback field | Message body |
---|---|---|
SUCCESS VALCHANGE
|
(Optional) A serialized business object reflecting changes.
| |
|
VALDUPES FAIL
|
(Optional) An error message.
|
Table 5. WebSphere MQ feedback codes and InterChange Server response values
If the business object can be processed, the application creates a report message with the feedback field set to MQFB_PAN (or a specific InterChange Server value). Optionally, the application populates the message body with a serialized business object containing any changes. If the business object cannot be processed, the application creates a report message with the feedback field set to MQFB_NAN (or a specific InterChange Server value), then, optionally includes an error message in the message body. In either case, the application sets the correlationID field of the message to the messageID of the adapter message and issues it to the queue specified by the replyTo field.
Upon retrieval of a response message, the adapter matches the correlationID of the response to the messageID of a request message. The adapter then notifies the thread that issued the request. Depending on the feedback field of the response, the adapter either expects a business object or an error message in the message body. If a business object was expected, but the message body is not populated, the adapter simply returns the same business object that was originally issued by InterChange Server for the Request operation. If an error message was expected, but the message body is not populated, a generic error message will be returned to InterChange Server along with the response code.
You can extend the WebSphere MQ feedback codes to override the default interpretations, shown in Table 5, by specifying the connector property, FeedbackCodeMappingMO. This property allows you to create a meta-object in which all InterChange Server-specific return status values are mapped to the WebSphere MQ feedback codes.
The return status assigned to a feedback code is passed to InterChange Server. For more information, see "FeedbackCodeMappingMO".
For business objects with the retrieve verb support synchronous delivery only, the connector processes business objects with these verbs as it does for the synchronous delivery defined for create, update and delete. However, when using retrieve, exists, and retrieve by content verbs, the responseTimeout and replyToQueue are required. Furthermore, for retrieve and retrieve by content verbs, the message body must be populated with a serialized business object to complete the transaction.
Table 6 shows the response messages for these verbs.
Table 6. Population of response message
Verb | Feedback field | Message body |
---|---|---|
Retrieve
|
FAIL
|
(Optional) An error message.
|
The Adapter for FRONT ARENA uses a newly developed data handler which is capable of coping with native FRONT ARENA messages. The data handler supports both message-to-business object conversion and conversion in the opposite direction.
When converting messages to business objects, the data handler relies on a newly developed name handler which determines the type of business object to be created from certain message fields. For details about this and other connector-specific properties, see Configuring the data handler. For details about developing a data handler, see the Data Handler Guide.