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.
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.
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 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.
Object-level ASI provides fundamental information about the nature of a business object and the objects it contains. Table 9 describes the business object-level ASI of business objects that represent proxy objects.
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. |
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 10. 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 10.
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 14.
Table 11 describes the ASI for simple attributes. A simple attribute is always a non-child, for example a boolean, string, or integer value.
Table 11. Attribute-level ASI for simple attributes
Attribute | Description |
---|---|
Name | Specifies the business object field name. |
Type | Specifies the business object field type. See Table 14 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:
|
DefaultValue | Not used. |
Table 12 describes the ASI for complex attributes containing child objects that are not methods.
Table 12. 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:
|
Cardinality | Set to 1. |
Table 13 describes the ASI of complex attributes containing child objects that are methods.
Table 13. 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:
|
Cardinality | Set to 1. |
Note that methods have arguments and return values. Arguments and return values can be complex (containing child objects) or simple.