doVerbFor()

Performs the verb processing for the active verb of a business object.

Syntax

public int doVerbFor(CWConnectorBusObj theBusObj);

Parameters

theBusObj
Is the business object whose active verb is to be processed.

Return values

An integer that indicates the outcome status of the verb operation. Compare this integer value with the following outcome-status constants to determine the status:

CWConnectorConstant.SUCCEED
The verb operation succeeded.

CWConnectorConstant.FAIL
The verb operation failed.

CWConnectorConstant.APPRESPONSETIMEOUT
The application is not responding.

CWConnectorConstant.VALCHANGE
At least one value in the business object changed.

CWConnectorConstant.VALDUPES
The requested operation found multiple records in the application database for the same key value.

CWConnectorConstant.MULTIPLE_HITS
The connector finds multiple matching records when retrieving using non-key values. The connector returns a business object only for the first matching record.

CWConnectorConstant.RETRIEVEBYCONTENT_FAILED
The connector was not able to find matches for Retrieve by non-key values.

CWConnectorConstant.BO_DOES_NOT_EXIST
The connector performed a Retrieve operation, but the application database does not contain a matching entity for the requested business object.

Exceptions

ConnectionFailureException
Thrown if the connector has lost the connection with the application.

VerbProcessingFailedException
Thrown if the verb processing fails.

Notes

The doVerbFor() method performs the action of the active verb in the theBusObj business object. This method is the primary public interface for the business object handler. However, when the connector framework invokes a business object handler, it actually executes the low-level doVerbFor() method, inherited from the BOHandlerBase class. The low-level doVerbFor() method calls this doVerbFor() (in the business-object-handler class), which the connector developer must implement. For more information, see "Populating the return-status descriptor"..

Important:
The CWConnectorBOHandler class does not provide a default implementation of the doVerbFor() method. Therefore, the business-object-handler class must implement this method.

If the doVerbFor() method needs to throw one of its exceptions, it first needs to populate an exception-detail object that contains information about the exception. In particular, the method must set the status code, as Table 121 shows.

Table 121. Exception status codes for the doVerbFor() method

doVerbFor() exception Exception status code
ConnectionFailureException
APPRESPONSETIMEOUT
VerbProcessingFailedException
The same outcome status code that doVerbFor() returns

To initialize an exception-detail object, follow these steps:


setMsg() Sets a message in the exception-detail object if there is an informational, warning, or error return message.
setStatus()
Sets a status return code, which is an integer whose value should be the same as shown in Table 121.

The connector framework handles copying information from the exception-detail object into the return-status descriptor that it returns to the integration broker:

For more information on how to implement this method, see Implementing the doVerbFor() method.

See also

setErrorString(),, setStatus()

Copyright IBM Corp. 1997, 2004