This section describes how to use Business Object Designer to generate business object definitions using the XML ODA. For information on launching Business Object Designer, see the Business Object Development Guide. Business Object Designer provides a wizard, called Business Object Wizard, that guides you through each of these steps. After you launch an ODA, you must launch Business Object Designer to obtain access to Business Object Wizard (which configures and runs the ODA). There are six steps in Business Object Wizard to generate business object definitions using an ODA.
After starting the ODA, do the following to start the wizard:
Business Object Wizard displays the first window in the wizard, named Select Agent. Figure 44 illustrates this window.
To select, configure, and run the ODA, follow these steps:
Figure 44 illustrates the first dialog box in Business Object Wizard's six-step wizard. From this window, select the ODA to run.
To select the ODA:
Business Object Wizard displays your selection in the Agent's name field.
The first time Business Object Wizard communicates with XML ODA, it prompts you to enter a set of ODA configuration properties as shown in Figure 45.
Figure 45. Specifyng ODA configuration properties
Configure the
XML ODA properties described in Table 82.
Table 82. XML ODA configuration properties
Row number | Property name | Property type | Description |
---|---|---|---|
1 | FileName | String | Full pathname of the DTD or schema document. A DTD file must have the .dtd extension; a schema-document file must have the .xsd extension. |
2 | Root | String |
Name of the XML element that is to be treated as the root element. If no root element is specified, the XML ODA makes the following assumptions:
|
3 | TopLevel | String | Name to be used for the top-level business object that the ODA generates. The ODA prepends the top-level business object with the business-object prefix (which the BOPrefix property specifies), separated by an underscore (_). If you do not specify a top-level name, the ODA assigns the name BOPrefix_Root (where BOPrefix and Root are the values of the BOPrefix and Root properties) as the name of the top-level business object. |
4 | BOSelection | String |
A boolean value (true or false) to indicate whether the XML ODA will allow you to select the names of elements for which business object definitions are to be used.
The default is false.
|
5 | BOPrefix | String | Prefix that the ODA applies to the name of each business object definition for the XML document. If you do not specify a business-object prefix, the ODA does not prepend any string to the name of the business object definition. |
6 | DoctypeorSchemaLocation | String |
A boolean value (true or false) to indicate whether the XML ODA should generate attributes for:
The default is true.
|
7 | TraceFileName | String |
Full pathname of the file into which XML ODA writes trace information. If the file does not exist, XML ODA creates it in the specified directory. If the file already exists, XML ODA appends to it. By default, the XML ODA creates a trace file named XMLODAtrace.txt in the ODA\XML subdirectory of the product directory. Use this property to specify a different name for the trace file.
|
8 | TraceLevel | Integer | Level of tracing enabled for XML ODA. Valid values are zero through five (0-5). Property defaults to a value of 5 (full tracing enabled). For more information, see "Working with error and trace message files". |
9 | MessageFile | String |
Full pathname of the error and message file. By default, the XML ODA creates a message and error file named XMLODAAgent.txt. Important: The error and message file must be located in the ODA\messages subdirectory of the product directory. Use this property to verify or specify an existing file.
|
You can save these properties in a named profile so that you do not need to re-enter them each time you use XML ODA. For information on specifying an ODA profile, see the Business Object Development Guide.
Business Object Designer uses the properties configured in the previous step to connect the tool to the specified XML schema (DTD or schema document). After connecting, Business Object Designer displays a tree whose nodes represent all the XML elements defined in the XML schema.
You can expand the top-level XML element to display the entire hierarchical representation. For each XML element, XML ODA creates a child business object definition.
Figure 46 illustrates this dialog box with some XML elements expanded.
Figure 46. Tree of XML elements with expanded nodes
Select all required XML elements and click Next.
After you identify all the XML elements to be associated with the generated business object definitions, Business Object Designer displays the dialog box with only the selected objects. Figure 47 illustrates this dialog box.
Figure 47. Confirming selection of objects
This window provides the following options:
After you confirm the XML elements, the next dialog box informs you that Business Object Designer is generating the business object definition. If a large number of Component Interfaces has been selected, this generation step can take time.
Figure 48 illustrates this dialog box.
Figure 48. Generating the business object definitions
The XML ODA generates the name for a business object definition from the following information:
It separates each of these values with an underscore (_) character. Therefore, the name it generates has the following format:
BOPrefix_TopLevel_XMLelement
Because the XML ODA needs additional information about the verbs, Business Object Designer displays the BO Properties window, which prompts you for the information. Figure 49 illustrates this dialog box.
Figure 49. Providing additional information - verbs
In the BO Properties window, enter or change the verb information. Click in the Value field and select one or more verbs from the pop-up menu. These are the verbs supported by the business object.
If your XML document has a schema document that contains an anyAttribute element, the XML ODA displays an additional BO Properties window, as shown in Figure 50.
Figure 50. Providing additional information - attribute names
In this BO Properties window, enter the names of the business object attributes you want the XML ODA to create. Separate each attribute with a semicolon (;). For more information on anyAttribute, see Supported schema-document structures.
After you provide all required information in the BO Properties dialog box and click OK, Business Object Designer displays the final dialog box in the wizard. In this dialog box, you can take any of the following actions:
For more information, and to make further modifications, see the Business Object Development Guide.
Figure 51 illustrates this dialog box.