This section describes how to use the MetaSolv 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.
The ODA runs on Windows 2000 on a machine on which the meta-data repository (that is, the IDL files) resides, using the start_MetaSolvODA.bat from the Windows 2000 command line.
The ODA for MetaSolv has a default name of MetaSolvODA. The name can be changed by changing the value of the AGENTNAME variable in the start script.
To start the ODA, from a Windows 2000 console window run this command:
start_MetaSolvODA
You configure and run MetaSolvODA using Business Object Designer. Business Object Designer locates each ODA by the name specified in the AGENTNAME variable of each script or batch file. The default ODA name for this connector is MetaSolvODA. You can run multiple instances of the ODA, either on the local host or a remote host in the network. Each instance has to run on a unique port if multiple instances are being run on the same machine.
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:
Selecting the agent
Figure 2.
Select
New Using ODA
Figure 3. Step 1 - Selecting the agent
After you click Next on the Select Agent screen, the Business Object Wizard - Step 2 of 6 - Configure Agent screen appears which illustrates sample values.
Figure 4. Step 2 - Configure the agent
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 6. Configure agent properties
Property name | Default value | Type | Required | Description |
---|---|---|---|---|
DefaultBOPrefix | None | String | Yes | The BO prefix that is used by by the ODA for BO definitions. |
FileLocation | None | String | Yes | Directory where IDL files are located. |
TraceFileName | MetaSolvODA trace.txt | String | Yes | The name of the trace message file; for example, MetaSolvODAtrace.txt. |
TraceLevel | 5 | Integer | Yes | The tracing level (from 0 to 5) for the Agent. . |
MessageFile | BIA_MetaSolvODA Agent.txt | String | Yes | The name of the message file that contains all the messages displayed by the ODA. For MetaSolv, the name of this file is BIA_MetaSolvODAAgent.txt. If you do not correctly specify the name of the message file, the ODA will run without messages. |
The Business Object Wizard - Step 3 of 6 - Select Source screen appears, as illustrated in Figure 5.
This step provides the list of MetaSolv IDL files present in the folder specified by the File Location on the previous screen. Clicking on the file which is to be used for generating BO definitions displays the hierarchical structure of the MetaSolv classes present in the IDL file. The hierarchy can be traversed until the leaf nodes are reached in the class tree. Multiple classes can be selected for generation and they could belong to any level in the hierarchy or could be part of a separate hierarchy. Only the classes which are selected will be generated by the ODA.
Children of a class will not be generated by default, they have to be explicitly selected. This can be done by holding the shift key and clicking the child objects which have to be generated. When a parent storable class is selected it will generate the parent to child relationship for all the children within the parent class but the definitions of only the selected child objects will be generated.
For resolving the dependencies within IDL files (i.e. a class has an attribute of a type which has the definition in some other IDL file) there are two methods to resolve these issues:
If PSR_Types2.idl needs WDIUtil.idl file then either the definitions of objects needcan be copied into PSRTypes2.idl or the ODA could be run on WDIUtil.idl file first and generate the dependent objects before the objects are generated from PSRTypes2.idl.
The generated BO's have some properties which have to be set individually before the BO can be used by the Connector. The key fields for the BO have to be marked manually. The name of the key field in the BO has to be specified as BO ASI for the respective BO. For the MetaSolv adapter the BO's expect only one key field. The name of that key field must be set as BO ASI. For In MetaSolv_Customer BO the key attribute custAcctId is set as the BO ASI. The adapter does not use required and foreign key properties of the attributes and so are not set by the ODA.
Figure 5. Step 3 - Select Source
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 6. Step 4 - Confirm source node
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.