This section provides the following information about how the methods of the C++ connector library indicate error conditions:
In the C++ connector library, the outcome-status constants in the BusObjStatus.h file define the C++ return codes. Table 87 lists the C++ outcome-status constants.
Outcome-status constants are provided for use in user implementations of many of the C++ virtual methods, as Table 88 shows. Although your code can return these values from within any method, some of the return codes were designed with specific uses in mind. For example, VALCHANGE informs an integration broker that the connector is sending a business object with changed values.
Table 88. Outcome-status values for C++ virtual methods
Virtual method | Possible outcome-status codes |
---|---|
init() | BON_SUCCESS, BON_FAIL, BON_UNABLETOLOGIN |
doVerbFor() | BON_SUCCESS, BON_FAIL, BON_APPRESPONSETIMEOUT, BON_VALCHANGE, BON_VALDUPES, BON_MULTIPLE_HITS, BON_FAIL_RETRIEVE_BY_CONTENT, BON_BO_DOES_NOT_EXIST |
gotApplEvent() | BON_SUCCESS , BON_FAIL, BON_CONNECTOR_NOT_ACTIVE,
BON_NO_SUBSCRIPTION_FOUND |
pollForEvents() | BON_SUCCESS, BON_FAIL, BON_APPRESPONSETIMEOUT |
terminate() | BON_SUCCESS , BON_FAIL |
The outcome-status constant that the connector framework receives helps to determine its next action, as follows:
When the connector framework receives this outcome status, it copies the BON_APPRESPONSETIMEOUT status into the return-status descriptor and returns this descriptor to inform the connector controller that the application is not responding. Once it has sent this return-status descriptor, the connector framework stops the process in which the connector runs. A system administrator must fix the problem with the application and restart the connector to continue processing events and business object requests.
During request processing, the connector framework copies the outcome status into the status field of the return-status descriptor and includes this descriptor in its response to the integration broker. It continues execution of the connector. For some outcome-status values, the connector framework also includes a response business object in its response. For more information, see "Updating the request business object".
During request processing, the connector framework sends an empty structure, called a return-status descriptor, into the business object handler's doVerbFor() method. When doVerbFor() completes verb processing (either successfully or otherwise), the connector framework includes the return-status descriptor as part of its response to the integration broker.
WebSphere InterChange Server |
---|
If your business integration system uses InterChange Server, the collaboration can access the information in this return-status descriptor to obtain the status of its service call request. Therefore, the doVerbFor() can provide status information about verb processing to the collaboration by setting the message and status code within the return-status descriptor. |
The connector framework automatically copies the outcome status that doVerbFor() returns into the status field of the return-status descriptor. Therefore, the doVerbFor() method can set a message in the return-status descriptor but it should not set the status, as this status will be overwritten when the connector framework copies the outcome status into this status field. For more information about the return-status descriptor and the doVerbFor() method, see "Populating the return-status descriptor".