Using the ODA to create business object definitions

The steps outlined in this section include sample screens of an Object Discovery Agent that converts Roman-army soldiers (in XML format) to business object definitions.

  1. Open Business Object Designer Express using a method listed in Table 8.
  2. Click File -> New Using ODA.

    Business Object Designer Express invokes Business Object Wizard, which displays the first dialog box in the wizard, Select Agent, shown in Figure 35.

    Figure 35. Select Agent dialog box


  3. To select the ODA to which Business Object Wizard connects:
    1. Click the Find Agents button to display in the Located agents box those ODAs that are currently running (those that have been started with their startup scripts).
      Note:
      If Business Object Wizard does not locate your desired ODA, check the startup of the ODA.

      Business Object Wizard identifies each running ODA by the name specified for the AGENTNAME variable of its startup script or batch file. This sample ODA is named Roman.

    2. Select the desired ODA from the Located agents list. Business Object Wizard displays your selection in the Agent's name field. Alternatively, you can find the ODA by specifying its host name and port number.
  4. Click Next. Business Object Wizard attempts to connect to the specified ODA. If the ODA has been started, Business Object Wizard displays a status window as it connects to the ODA, as Figure 36 shows.

    Figure 36. Connecting to an ODA


  5. Once Business Object Wizard is connected to the ODA, it displays the second wizard dialog box, Configure Agent, which is shown in Figure 37. This dialog box displays the ODA configuration properties required to access the data source and initialize the ODA.

    Figure 37. Configure Agent dialog box


  6. Specify ODA configuration values or select a profile to display previously saved values. One of the required configuration areas for the ODA is to set up the logging and tracing. For more information, see Setting up logging and tracing.

    The first time you use a particular ODA, you specify values for each of its configuration properties. After doing so, you can save the property values in a named profile by clicking the Save button. The next time you use the same ODA, you can select the saved profile from the Select profile box. For more information, see "Entering values and saving a profile".

  7. Click Next. Business Object Wizard displays the third wizard dialog box, Select Source, which is shown in Figure 38. The Select Source dialog box displays the source-node hierarchy, which is a tree structure with the top-level objects at the top and child objects underneath. In the initial display, the Select Source dialog box usually displays only the top-level source nodes.
    Important

    If the ODA is unable to proceed when you click Next, verify that the ODA message file you have specified for the MessageFile configuration property exists in the ProgramDir\ODA\messages directory. For more information, see Specifying the ODA message file.

    Figure 38. Initial Select Source dialog box


    The nodes of the source-node hierarchy can be table names, business object names, schema, or functions, depending on the ODA's data source. The ODA illustrated in these steps generates nodes from objects within an XML file called RomanArmy.xml. Figure 38 shows the single top-level source node for the Roman general specified for the Army general configuration property (see Figure 37).

  8. Select objects in the source-code hierarchy for which you want the ODA to generate business object definitions. To select one source node, click on the node name. To select additional nodes, press Cntrl key and click. In Figure 39, several source nodes have been expanded and three source nodes (which correspond to XML objects) have been selected.

    Figure 39. Select Source dialog box with source nodes expanded and selected


    To expand a source node to display its children, do either of the following:

    Figure 40. Context menu for a node


    To expand the selected node, click Retrieve all items. Business Object Wizard displays the next level of source nodes: the child nodes for the expanded parent node. To open lower levels, repeat this process.

    Note:
    Business Object Wizard provides several other mechanisms to move through the nodes of the source-node hierarchy. For more information, see Moving through the source-node hierarchy.
  9. After you select the source nodes for which business object definitions are to be generated, click Next. Business Object Wizard displays the fourth wizard dialog box, Confirm Source, which is shown in Figure 41. This dialog box allows you to confirm your selection of source nodes. Selected source nodes are displayed in a highlighted font. In Figure 41, the source nodes for Cordius, Cicero, and Vulso are highlighted.

    Figure 41. Confirming the objects for which to generate business object definitions


    If your selection is not correct, click Back to return to the previous dialog box and make the necessary changes.

  10. When your selection is correct, click Next. Business Object Wizard displays the wizard's fifth screen, Generating Business Objects, which is shown in Figure 42. This screen informs you that the ODA is generating the business object definitions.

    Figure 42. Generating the definitions


    If the ODA needs additional information, Business Object Wizard prompts you for this information by displaying the BO Properties dialog box. However, this sample ODA does not require additional information. Therefore, this dialog box does not open. For more information about the BO Properties dialog box, see "Providing additional information"..

  11. After the ODA completes the generation of business object definitions, Business Object Wizard displays the final dialog box in the wizard, Save Business Objects, shown in Figure 43. This dialog box offers the following options to save the business object definitions that the ODA has generated:
    Important

    If the ODA generates a business object definition from a data-source object that does not identify a key element, this business object definition will not have a key attribute. Every business object must have at least one key. If the ODA might have generated business object definitions that do not include keys, you might want to choose the "Open the new BOs in separate windows" option instead of saving the business object definitions. Within Business Object Designer Express, you can verify that each business object definition has a key attribute, adding one if none exists. Business Object Designer Express does not allow you to save any business object definition that does not include a key.

    Figure 43. Saving the business object definition


    Click Finish to save the business object definitions or Cancel to exit without saving these definitions. In either case, Business Object Wizard disconnects from the ODA. This dialog box also provides the option to have Business Object Wizard shut down the ODA after it disconnects. If you no longer need to use the ODA, click this option.

    After you click Finish, if you have told Business Object Wizard to save the business object definitions to a file, Business Object Wizard provides a browse window that allows you to specify the name of this file, where to save it, and what format to use (text file or InterChange Server Express-specific format).

You have now successfully created business object definitions using an Object Discovery Agent.

Copyright IBM Corp. 2003, 2004