getBO()

Builds a business object based on the information in an event from the event store.

Syntax

public CWConnectorBusObj getBO(CWConnectorEvent eventObject);
public CWConnectorBusObj getBO(CWConnectorEvent eventObject
    int status
    String RetrieveVerb);

Parameters

eventObject
Is the event that contains the business object information.

status
Is a status value set by some method or exception within the getBO() method.

RetrieveVerb
Is used to override the default RetrieveByContent verb used to fetch the application record for which an event was detected. getBO() will use the specified verb instead of RetrieveByContent to fetch the modified record from the application.

Return values

A CWConnectorBusObj object containing a new business object based on information retrieved from the application's database. If the method was unable to retrieve the eventObject event object, it returns null.

Exceptions

AttributeNotFoundException
Thrown if getBO() cannot find an attribute when assigning a key value to a key attribute.

SpecNameNotFoundException
Thrown if the name of the business object within the event object is invalid.

AttributeValueException
Thrown if the retrieved attribute value is not valid for a particular attribute.

InvalidVerbException
Thrown if the verb within the event object is invalid.

WrongAttributeException
Thrown if getBO() encounters an invalid attribute type when assigning a key value a key attribute. For example, if the attribute is a container, it cannot hold a key value.

AttributeNullValueException
Thrown if the business object could not be created.

Notes

The getBO() method returns a business object that contains information for an application entity that the eventObject event object describes.

Important:
The getBO() method must be overridden if you want to return an internal status code to the calling method.

The default implementation of this method performs the following actions:

Note:
The getBO() method is usually called from the poll method, pollForEvents().

As described above, the default implementation of getBO() has several ways to indicate to the calling method that certain error or exception conditions occur. However, if you need to return a particular internal status value (such as the status attribute of a thrown exception) to the calling method, you can override this default implementation. For your implementation of getBO(), use the second form of this method's signature, which provides a status argument. Within getBO(), assign some status value to this argument before you exit getBO(). From the calling method, pass in the uninitialized status value and, after the call to getBO(), access the initialized status value.

Note:
The default implementation of the pollForEvents() method calls the first form of getBO(); that is, it does not handle any initialized status value returned by getBO().

See also

doVerbFor(),, getTerminate(), pollForEvents(), setTerminate()

Copyright IBM Corp. 1997, 2004