Request processing

Connectors can receive requests from collaborations and make requests to the application on their behalf. For example, a collaboration might send a connector a request to delete a contract, update a part, or create a customer, in the form of a Contract.Delete, Part.Update, or Customer.Create business object.

When a connector controller receives a collaboration's request, it forwards the request to the connector agent. The connector agent translates the business object into an application request--typically a set of calls to the API--and then returns the results.

Figure 33 illustrates a connector's interactions with respect to handling collaboration requests.

Figure 33. Connector interactions for request handling


Note:
A collaboration sends a business object to a specific connector in a request/response type of interaction, unlike the publish/subscribe interactions that characterize event notification.

When a connector agent receives a request, it determines how to process the request based on three types of information:

These factors are described in the topics that follow.

Verb-based processing

A connector agent reacts to the Create, Retrieve, Update, or Delete verb in a request according to the logic and API of its application. Two connector agents might handle the same type of request differently, although the result is logically the same.

For some connectors, only one method is required for performing operations on a business object, regardless of what verb the request contains. But for many connectors, each verb requires a different method.

When a connector agent receives a request, it invokes the method in the application that matches the business object's active verb. For example, when a connector agent receives an AppAEmployee.Update business object, it invokes the Update method on the AppAEmployee object. The Update method interacts with the application in order to perform the update.

Figure 34 illustrates some verb handling methods.

Figure 34. Processing requests


When the connector in Figure 34 receives a Customer.Create, Item.Retrieve, or Contract.Delete request, it invokes its DoCreate, DoRetrieve, or DoDelete method, respectively.

Verb-based application-specific information

In a business object definition, application-specific information provides additional input to a connector agent that is processing an instance of the business object. Each verb can have application-specific information. The format and content of the application-specific information itself is completely connector-specific.

For example, application-specific information for the Retrieve verb in a business object definition might supply special input arguments to the Retrieve method in that connector agent.

As an example, suppose that the MyApp application has three forms in which information about InventoryItem appears:

When the MyApp connector agent performs an operation on an inventory item, it must reference the correct form for that operation. The application-specific information field associated with each verb in the InventoryItem business object definition can store the form name.

The combination of verb-specific methods and application-specific input to those methods gives a connector agent unique instructions for processing.

Copyright IBM Corp. 1997, 2004