doVerbFor()

Invokes the business object handler to perform the verb processing for the active verb in the business object.

Syntax

public final int doVerbFor(CWConnectorReturnStatusDescriptor rtnStat);

Parameters

rtnStat
Is an empty return-status descriptor object, which the doVerbFor() method populates with a status and message for the execution status of this method. The calling code can access the execution status from this return-status descriptor.

Return values

An integer that specifies 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 for the same key value.
CWConnectorConstant.MULTIPLE_HITS
The connector finds multiple matching records when retrieving with non-key values. The connector will only return the first matching record in a business object.
CWConnectorConstant.RETRIEVEBYCONTENT_FAILED
The connector was not able to find matches for Retrieve by non-key values.
CWConnectorConstant.BO_DOES_NOT_EXIST
The requested business object entity does not exist in the database.

Exceptions

None.

Notes

The doVerbFor() method invokes the business object handler (CWConnectorBOHandler object) to perform the action specified by the active verb in the business object. The business object handler provides all the operations for the verbs that the business object definition supports. The active verb is one of the list of verbs that the business object definition contains. To determine the active verb for a business object, you can use the getVerb() method.

Within the doVerbFor() method, the empty passed-in rtnStat return-status descriptor is populated with a status and message to indicate the execution status of the verb processing. The calling code can then use the accessor methods of the CWConnectorReturnStatusDescriptor class to obtain execution information about the verb processing from the populated return-status descriptor.

This doVerbFor() method is normally called from the pollForEvents() method in the connector class (CWConnectorAgent) to obtain the application information for an event. The default implementation of pollForEvents() calls the getBO() method of the CWConnectorEventStore class to obtain application information. The getBO() method calls the doVerbFor() method in the CWConnectorBusObj class. If you do not use getBO() in your pollForEvents() method, you can call doVerbFor() directly from pollForEvents() by passing in an instantiated return-status descriptor. You can then obtain verb-processing status from the populated return-status descriptor once doVerbFor() exits.

See also

doVerbFor() (in CWConnectorBOHandler), getVerb(),, pollForEvents(),, setVerb()

Copyright IBM Corp. 1997, 2004