The WebSphere Access Resource Adapter sends information to and receives
information from a collaboration as a WebSphere business integration system
business object. An application component sends information to and
receives information from the Access Resource Adapter through the Java
interfaces for the Record type (see Table 12).
Table 12. Server Access for J2EE CCI implementation for creating a record
In Table 12, the Supported Methods column lists those interface methods that Server Access for J2EE implements. Interface methods not listed there fall into one of the following categories:
All other methods in this interface are not implemented; that is, a call to one of these interface methods not listed does not generate a compile error but the method has no functionality.
This section provides the following information about how to handle Record extensions:
A Record is the Java representation of a data structure that
encapsulates the data exchanged between an application component and the
underlying EIS. It is used as input and output in the
Interaction.execute() method. Server Access for J2EE
supports the Record extensions shown in Table 13.
Table 13. Record extensions that Server Access for J2EE supports
The MappedRecord and IndexedRecord interfaces are hierarchical; that is, they can contain other Record structures.
To pass business data to a WebSphere Access Resource Adapter, an application component needs to create a CwMappedRecord instance and pass it to the Interaction.execute() method as an input record. A CwMappedRecord instance represents a WebSphere business integration system business object, which is an instance of the WebSphere business integration system BusObj class. It holds one or more key-value pairs in the same way that a BusObj instance holds one or more pairs of attributes and their associated values. Therefore, each key in a CwMappedRecord instance must contain a key-value pair for each of the following:
Make sure that you match the names of the business object attributes in the key-value pairs of the CwMappedRecord instance. The Access Resource Adapter does not throw an exception if these names do not match. Any mismatch is not detected until the data is passed to InterChange Server during the execution of the interaction.
Figure 9 shows the correspondence between a CwMappedRecord instance and a WebSphere business integration system business object (BusObj instance).
Figure 9. Correspondence between CwMappedRecord and a business object
To specify a single-cardinality child object, set the value of the appropriate key to another CwMappedRecord instance. To specify a multiple-cardinality child object, set the value of the appropriate key to a CwIndexedRecord instance. For more information, see "CwIndexedRecord".
A Java IndexedRecord represents an ordered and indexed list. A CwIndexedRecord instance represents an array of WebSphere business integration system business objects, which is an instance of the WebSphere business integration system BusObjArray class. It holds an n-cardinal list of elements in the same way that a BusObjArray instance holds a multiple-cardinality attribute (and its values). Therefore, each element in a CwIndexedRecord instance must correspond to a business object.
Figure 10 shows the correspondence between a CwIndexedRecord instance and a WebSphere business integration system business object array (BusObjArray instance).
Figure 10. Correspondence between CwIndexedRecord and a business object array
The CwIndexedRecord contains one or more elements, each of which can contain a primitive value (such as the String values in Figure 10) or a CwMappedRecord instance. However, all elements must have the same type.
The WebSphere Access Resource Adapter converts between Record
instances and business objects. It communicates with the application
component through Record instances and with InterChange Server
through business objects. Table 14 shows the business objects involved in the execution of a
collaboration along with their equivalents within the application
component.
Table 14. Business objects involved in collaboration execution
In a collaboration | In the execute() method |
---|---|
Triggering business object |
Input record
|
Business object returned by the collaboration |
Output record
|
To provide data to an InterChange Server-managed EIS, an application component must perform the following tasks with records:
To create a Record extension to send to an Access Resource Adapter, the application component must take the following steps:
The record factory is capable of generating Record instances.
This method requires as an argument the name of the record to be created. This argument must have the following syntax:
<bus_obj>:<verb>
where bus_obj is the name of the business object and verb is the name of the WebSphere business integration system verb. Inclusion of the verb is optional.
This method requires as an argument either an empty string ("") or the keyword null.