Sends a business object request to the connector framework. This is an asynchronous request.
Syntax
public int gotApplEvent(CWConnectorBusObject theBusObj);
Parameters
Return values
An integer that indicates the outcome status of the event delivery. Compare this integer value with the following outcome-status constants to determine the status:
Exceptions
None.
Notes
The gotApplEvent() method sends the theBusObj business object to the connector framework. The connector framework does some processing on the event object to serialize the data and ensure that it is persisted properly. It then makes sure the event is sent to the integration broker.
WebSphere InterChange Server |
---|
If the integration broker is InterChange Server, the connector framework sends the event (as a business object) to InterChange Server across its configured delivery transport mechanism (such as JMS or CORBA IIOP). |
Other integration brokers |
---|
If the integration broker is a WebSphere message broker (WebSphere MQ Integrator, WebSphere MQ Integrator Broker, or WebSphere Business Integration Message Broker) or WebSphere Application Server, the connector framework sends the event (as an XML message) to the integration broker across its configured delivery transport mechanism of a JMS queue. |
Before sending the business object to the connector framework,
gotApplEvent() checks for the following conditions and returns the
associated outcome status if these conditions are not met:
Condition | Outcome status |
---|---|
Is the status of the connector active; that is, it is not in a "paused" state? When the connector's application-specific component is paused, it no longer polls the application. | CONNECTOR_NOT_ACTIVE |
Is there a subscription for the event? | NO_SUBSCRIPTION_FOUND |
The connector uses the pollForEvents() method to poll the event store for subscribed events to send to the integration broker. Within pollForEvents(), the connector uses the gotApplEvent() method to send an event (represented as a business object) to the connector framework. The connector framework then routes this business object to the integration broker. Therefore, the poll method should check the return code from gotApplEvent() to ensure that any errors that are returned are handled appropriately. For example, until the event delivery is successful, the poll method should not remove the event from the event store. Instead, the poll method should update the event record's status to reflect the results of the event delivery based on the return code of gotApplEvent(). For more information, see Sending the business object.
The gotApplEvent() method initiates an asynchronous execution of an event. Asynchronous execution means that the method does not wait for receipt of the event, nor does it wait for a response.
See also