Reserved values in business object handling

At runtime, when business objects containing the CxIgnore or CxBlank attribute values are sent from a source adapter to the WebSphere Application Server broker implementation, the CwXML data handler sets reserved values in place of those attribute values in the XML instance document that it passes to the broker; after the broker processes the business object and returns it as an XML message to the destination adapter, the data handler in the destination adapter restores the CxIgnore and CxBlank values. This sequence of actions is necessary to prevent the java object in the broker from assigning a default value of zero to those attributes when it processes the business object.

The following table shows the reserved values that are used in place of the values CxIgnore and CxBlank for each data type:

Data type CxIgnore CxBlank
int Integer.MIN_VALUE Integer.MAX_VALUE
float Float.MIN_VALUE Float.MAX_VALUE
double Double.MIN_VALUE Double.MAX_VALUE
string, date, longtext "CxIgnore"

Note:
For the Boolean data type, possible values are either 'true' or 'false'. Due to this limitation, it is not possible to set CxIgnore or CxBlank values for Boolean data type. The procedure for handling the Boolean data type is to define the attribute type as String data type to set 'CxIgnore' or 'CxBlank' values.
Business objects sent from the adapter agent are initiated to the values shown in the table above. However, any business object created in the user application, as in a Hub One Way or Hub Request interaction pattern, must be explicitly initiated. This can be accomplished by invoking BusinessObjectUtilities.initializeBO(<BOInstance>) on every business object created, as in the following sample fragment:
TestCustomerElement customer = new TestCustomerElement();
		AddressElement address = new AddressElement();

				customer.setAddress(address);
		BusinessObjectUtilities.initializeBO(customer);

		customer.setCustomerId("2424234");
		address.setCountry("USA");

Note that you should create all your business objects, create their parent/child structure, and invoke the initialization routine on the parent business object, before any business object attributes are set.

Copyright IBM Corp. 1997, 2003