Generating business object definitions

This section describes how to use the COM ODA in Business Object Designer to generate business object definitions. For information on launching and using Business Object Designer, see IBM WebSphere Business Integration Adapters Business Object Development Guide.

Starting the ODA

The ODA can be run from any machine that can mount the file system on which the metadata repository (the type library files) resides, using the start_COMODA.bat start file. This file contains start parameters, including the paths to certain required COM and connector .jar files. These .jar files must also be accessible from the machine on which you are running the ODA.

The ODA for COM has a default name of COMODA. The name can be changed by changing the value of the AGENTNAME variable in the start script.

To start the ODA, run this command:

start_COMODA

Note that this startup file requires that the directory of the Java compiler (javac.exe), be included in the PATH environment variable. For example, if javac.exe is in the directory c:\jdk131_02\bin, then include the following line in start_COMODA.bat:

set PATH=c:\jdk131_02\bin;%PATH%

Running Business Object Designer

Business Object Designer provides a wizard that guides you through the steps to generate a business object definition using the ODA. The steps are as follows:

Select the agent

To select the agent, follow these steps.

  1. Start Business Object Designer.
  2. Click File > New Using ODA. The Business Object Wizard - Step 1 of 6 - Select Agent screen appears.
  3. Select the ODA/AGENTNAME (from the start_COMODA script) in the Located agents list and click Next. (You may have to click Find Agents if the desired agent is not listed.)


    Figure 10. Select Agent Screen

Configure the agent

After you click Next on the Select Agent screen, the Business Object Wizard - Step 2 of 6 - Configure Agent screen appears. Figure 11 illustrates this screen with sample values.


Figure 11. Configure Agent screen

The properties you set on this screen are described in Table 10. You can save all the values you enter on this screen to a profile. Instead of retyping the property data next time you run the ODA, you simply select a profile from the drop-down menu and re-use the saved values. You can save multiple profiles, each with a different set of specified values.

Table 10. Configure Agent properties

Property name Default value Type Description
TypeLibraryPath None String (required) The path to the local type library file (.tlb, .dll, .ole, .olb, or .exe) that defines the COM interface.
PackageName None String (required) The package in which all the proxy files generated by COMProxy are stored. COMProxy generates the Java proxy objects that the connector requires to invoke COM components.
SaveToDirectory None String (required) The directory in which the package specified in PackageName is stored.
JarFileName None String (required) The .jar file in which the proxy classes generated by the ODA will be stored Note that the ODA determines the directory location where this file is placed.
BOPrefix None String The prefix that the ODA will add to the names of the business objects it generates.
TraceFileName None String The name of the trace message file; for example, COMODAtrace.txt.
TraceLevel 5 Integer (required) The tracing level (from 0 to 5) for the Agent. For details about tracing levels, see Tracing.
MessageFile None String (required) The name of the message file that contains all the messages displayed by the ODA. For COM, the name of this file is BIA_COMODAAgent.txt. If you do not correctly specify the name of the message file, the ODA will run without messages.
  1. Use the New and Save buttons in the Profiles group box the first time you run the ODA to create a new profile. When you use the ODA again, you can select an existing profile.
  2. Type the name of each property, its value, type and description, as defined in Table 10.
    Note:
    If you use a profile, the property values are filled in for you, though you can modify the values as needed.

Select a business object

The Business Object Wizard - Step 3 of 6 - Select Source screen appears, as illustrated in Figure 12. The screen lists the components that have been defined in the COM type library file. Use this screen to select any number of COM components for which the ODA will generate business object definitions.


Figure 12. Select Source screen

  1. If necessary, expand a COM component to see a list of methods of the component.
  2. Select the COM object(s) you want to use. In Figure 12, the name method is selected.
  3. Click Next.

Confirm the object selection

The Business Object Wizard - Step 4 of 6 - Confirm source nodes for business object definitions screen appears. It shows the object(s) you selected.


Figure 13. Confirm source node screen

Click Back to make changes or Next to confirm that the list is correct.

The Business Object Wizard - Step 5 of 6 - Generating business objects... screen appears with a message stating that the wizard is generating the business objects.

Note that if you selected a method (see Select a business object), that has a parameter or return value with a Java type of Object or Object[], the ODA displays the BO Properties screen, illustrated in Figure 14. Use this screen to map an object of such a type to either a COM component or String. The drop-down menu in the Value column lists only components from the current type library. For a complete list of the mapping of COM and Java types to business object ASI, see Table 9.


Figure 14. BO Properties screen

The ODA assigns a name to this screen that provides details about the component name, the method name of the component that the ODA is currently processing, and the name of the method parameter whose data type is Object or Object[].

Copyright IBM Corp. 1997, 2003