Connector business object structure

The connector processes business objects used by COM components. This section describes the key concepts related to the structure of business objects processed by the COM connector.

Attributes

For each attribute present in a COM component defined in a type library file (.tlb, .dll, .olb, .ole, or .exe), a corresponding business object attribute is generated by the ODA. The type library file contains interfaces, each with methods and properties. It is used by the ODA to compile proxy object definitions.

If an attribute in the COM class is not a simple attribute, and instead is a component, then the BO attribute maps to a child object whose definition matches the corresponding component in the COM object.

Business objects can be flat or hierarchical. A flat business object only contains simple attributes, that is, attributes that represent a single value (such as a string) and do not point to child business objects. A hierarchical business object contains both simple attributes and child business objects or arrays of child business objects that contain attribute values.

A cardinality 1 container object, or single-cardinality relationship, occurs when an attribute in a parent business object contains a single child business object. In this case, the child business object represents a collection that can contain only one record. The attribute type is the child business object.

A cardinality n container object, or multiple-cardinality relationship, occurs when an attribute in the parent business object contains an array of child business objects. In this case, the child business object represents a collection that can contain multiple records. The attribute type is the same as that of the array of child business objects.

Methods

For each method defined in the COM type library file, an attribute is created in the business object. The attribute type is a child BO containing attributes that represent method parameters. The attributes of the child BO appear in the exact same order as the parameters of the COM method. The child BO also has a Return_Value attribute, appearing last in the order of arguments, that represents the result of the COM method call. These attributes (of the child BO) can be simple type or object type (complex), depending on the type of the method parameter or return value. The return value is always last in the order of arguments.

Whenever properties or method names contain special characters, the attribute names corresponding to these are modified to suite WebSphere Business Integration format and the attribute ASI would be used to set the actual name of the property or method.

Application-specific information

Application-specific information provides the connector with application-dependent instructions on how to process business objects. If you extend or modify a business object definition, you must make sure that the application-specific information in the definition matches the syntax that the connector expects.

Application-specific information is represented as a name-value pair and can be specified for the overall business object, for each business object attribute, and for each verb.

Business object-level ASI

Object-level ASI provides fundamental information about the nature of a business object and the objects it contains. Table 4 describes the business object-level ASI of business objects that represent proxy objects.

Note:
ASI names are not recognized for business objects that represent methods, method parameters, and method return values. For details about business object attributes created for methods of COM objects, see Methods.

Table 4. Object-level ASI

Object-level ASI Description
proxy_class= <nameOfProxyClass> The name of the proxy class that the business object represents. Use this ASI to map a proxy class to a business object. You must specify this using valid Java Package notation (for example, java.lang.Vector).
auto_load_or_write=true Indicates that a business object represents a record structure that is used both as an argument and as a return value. This ASI tells the adapter to write to the proxy object (WriteToProxy) before the function call on arguments for child object arguments, and then read the proxy object (LoadFromProxy) after the function call returns a value.

Verb ASI

Every business object contains a verb. The verb describes how the data in the business object should be handled by the receiving application.

The verb ASI contains a sequence of attribute names, each of which contains a method for the generic business object handler to call. Typically, the method to be invoked belongs to the object itself (versus belonging to a parent of the business object), in which case you specify the method in the object's verb ASI. For example, a component that has the method IncrementCounter would require that you specify that method in the corresponding business object's verb ASI.

If the method to be invoked belongs to a parent in the business object hierarchy, then that parent can be referenced by prefixing the method name with the PARENT tag.

For example, Figure 4 illustrates a business object hierarchy whereby ContactDetails is a child object of Contact, which itself is a child of PSRCustomerAccount.

Figure 4. Business object hierarchy and verb ASI

If a method that belongs to PSRCustomerAccount is called on the ContactDetails business object, then the verb ASI for ContactDetails represents the business object hierarchy as follows:

PARENT.PARENT.<methodName>
 

If the method belongs instead to the Contact business object, then the verb ASI for ContactDetails must be set as:

PARENT.<methodName>
 

Note that only methods that belong to parent objects within the hierarchy can be called. Furthermore, a parent business object cannot invoke a child's method.

The connector developer determines the COM operations assigned to the verb. Supported verbs include:

The following keywords can be used in the verb ASI sequence of attribute names:

Table 5. Keywords allowed in verb ASI

Keyword Description
LoadFromProxy= <attributeName> Calls the getter method for the specified proxy object attribute, thus loading the attribute from the proxy to the business object.
WriteToProxy = <attributeName> Calls the setter method for the specified proxy object attribute, thus writing the attribute value from the business object to the corresponding proxy object.
LoadFromProxy (no attribute name) Calls all getter methods for non-method attributes on the current BO from the proxy object.
WriteToProxy (no attribute name) Calls all setter methods for non-method attributes on the current BO to the proxy object.
CBOH=<custom BO handler className> The class name of a custom BO handler, in cases where the generic BO handler is not used. For information about custom BO handlers, see Custom business object handlers.

For a given object, you can specify the four supported verbs (Create, Retrieve, Delete, and Update) and assign as actions of each verb n plus two methods, where n equals the number of methods in the corresponding COM component. The two additional methods are those supported by the connector (LoadFromProxy and WriteToProxy), defined in Table 5.

Attribute-level ASI

The attribute-level ASI of a business object can be for complex attributes, which contain child objects, and simple attributes. For a complex attribute, the ASI varies, depending on whether the contained child is a property or a method of an object. The mapping of all the attribute-types in the original COM type library to the ODA-generated business object is defined in Table 9.

Table 6 describes the ASI for simple attributes. A simple attribute is always a non-child, for example a boolean, string, or integer value.

Table 6. Attribute-level ASI for simple attributes

Attribute Description
Name Specifies the business object field name.
Type Specifies the business object field type. See Table 9 for details about mapping COM component types to Java proxy types and business object attribute types.
MaxLength Not used.
IsKey Each business object must have at least one key attribute, which you specify by setting the key property to true for an attribute. Note that this attribute is used by Business Object Designer, rather than by the connector.
IsForeignKey Specifies that the connector should check whether or not the object must be stored in the per call object pool (see Step 7).
IsRequired Not used.
AppSpecInfo Holds the original Java type. This attribute is formatted
as follows:


property=<propertyName>, type=<typeName>


property is the name of the COM object property. Use this name-value pair to
capture the original COM object property name.


type is the Java type of a simple attribute. See Table 9 for details
about mapping COM component types to Java proxy types and business object
attribute types.


This attribute should be set to proxy if the attribute is a business object. If it
does not map to a business object and is not intended to be de-referenced, as
in the case of a simple attribute, you can specify type=PlaceholderOnly. This
tells the BO handler to not de-reference and not populate the attribute. The
attribute can thus continue to be used as part of a multi-call flow if it is marked
as a foreign key (IsForeignKey is checked), or if use_attribute_value is set to
a compatible value.

DefaultValue Not used.

Table 7 describes the ASI for complex attributes containing child objects that are not methods.

Table 7. Attribute-level ASI for attributes containing non-method child objects

Attribute Description
type The type of the contained object. Set to proxy if the type is a business object.
ContainedObjectVersion Not used.
Relationship Specifies that the child is a container attribute. Set to Containment.
IsKey Not used
IsForeignKey Not used
Is Required Not used
AppSpecificInfo Holds the original COM application field Name. This attribute is
formatted as follows:


property=propertyName, use_attribute_value=<(optional)BOName.AttributeName>,
type=<typeName>


property is the name of the COM object property. Use this
name-value pair to capture the original COM object property
name. In the case of an attribute that holds an argument to a
method, do not set a value for property, as the argument does
not have a name and is simply an argument of any standard
type.


use_attribute_value is the business object name formatted
as BOName.AttributeName. Setting this ASI causes the adapter
to access the attribute from the per call object pool. Note that
this value is not set in the ODA when you create the business
object, but rather via Business Object Designer.


type is the Java type of a property. This should be set to proxy
if the attribute is non-simple, in other words, if it holds a business
object (the corresponding COM type is IDispatch*. See
Table 9 for the mapping of types across COM, Java,
and business objects.)

Cardinality Set to 1.

Table 8 describes the ASI of complex attributes containing child objects that are methods.

Table 8. Attribute-level ASI for attributes containing method child objects

Attribute Description
Name The business object field name
type The business object.
Relationship Set to Containment, indicating that this is a child object.
IsKey Set to true if the attribute name equals UniqueName, otherwise it is set to false.
IsForeignKey Set to false.
Is Required Set to false.
AppSpecificInfo Holds the original COM application field name, which represents the name
of the method call placed to the external COM server. This attribute is
formatted as:


method_name=<nameOfMethod>

Cardinality Set to 1.

Note that methods have arguments and return values. Arguments and return values can be complex (containing child objects) or simple.

Copyright IBM Corp. 1997, 2003