This section describes how to use the JD Edwards OneWorld 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 can be run from any machine that can mount the file system on which the metadata repository (that is, the IDL files) resides, using the start_OneWorldODA.bat (NT/Windows 2000) or start_OneWorldODA.sh (Unix) start file. This file contains start parameters, including the paths to certain required OneWorld and connector .jar files.
The ODA for OneWorld has a default name of OneWorldODA. The name can be changed by changing the value of the AGENTNAME variable in the start script (start_OneWorldODA.bat).
To start the ODA, run this command:
start_OneWorldODA
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:
After you click Next, the Business Object Wizard - Step 2 of 6 - Configure Agent screen appears. Figure 6 illustrates this screen with sample values.
Figure 6. Configure Agent screen
The properties you set on this screen are described in Table 4. 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 4. Configure Agent properties
Property name | Default value | Type | Description |
---|---|---|---|
BOPrefix | None | String | The prefix that the ODA prepends to the names of the business objects it generates. |
Environment | None | String | The environment that is used to connect to OneWorld. |
JarFileDirectory | None | String | (Required) The directory where the .jar files are located. All the .jar files having business functions that must be invoked using the adapter must be placed in this directory. |
NameOfTables | None | String | The names of the tables in OneWorld for which business objects have to be generated delimited by ;, for example, F4211;f4210. |
Password | None | String | The password that is used to connect to OneWorld. |
PortNo | None | String | The port number on which the JDE server is running. |
Server | None | String | The machine name on which JDE is running. |
TraceFileName | None | String | The name of the trace message file; for example, OneWorldODAtrace.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 OneWorld, the name of this file is BIA_OneWorldODAAgent.txt. If you do not correctly specify the name of the message file, the ODA will generate an error. |
UserName | None | String | The username that is used to connect to OneWorld. |
The Business Object Wizard - Step 3 of 6 - Select Source screen appears, as illustrated in Figure 7.
The following lists the rules associated with selecting objects for generation:
To determine which OneWorld objects listed on this screen are child objects
of a high-level object, refer to the original GenJava file. You can
also simply select all the OneWorld objects listed on this screen and generate
their corresponding business objects. The resulting business objects
will reflect the parent-child relationships.
Figure 7. Select Source screen
The ODA displays two options as tree nodes, Business Functions and XML BOs. Clicking Business Functions displays the tree containing the OneWorld objects in the .jar files found under the directory specified against the JarFileDirectory configuration property. For information specific to Business Functions, see Source node selection
Clicking XML BOs displays the child tree nodes. These child tree nodes correspond to the names of the tables that were entered in the ODA properties window. From the tables listed, you can select which tables are generated. For information specific to XML BOs, see XML business objects
You can choose objects from multiple .jar files for business object generation. To select the objects, use the Use This Object Instead button. The standard filter feature allows you to select a subset of child nodes of a tree.
The Business Object Wizard - Step 4 of 6 - Confirm source nodes for business object definitions screen appears. It shows the objects that you selected.
For business objects generated by using the ODA, key fields must be manually marked in Business Object Designer before saving the business objects. The ODA does not mark any attributes as key fields. If you plan to map values from one business object to another business object, you must mark the foreign keys. When the business object attribute needs a value from some other business object that has already been processed, the ASI tag, use_attribute_value, must be manually added to the attribute ASI.
Figure 8. 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.
You can generate both business function business objects or XML List business objects in one run of the ODA. Parallel generation of both kinds of business objects is supported.
If the business function business objects are being generated, the ODA will generate business objects for the OneWorld objects that you select by loading and introspecting all the selected classes. ODA uses the BOProperties window to get the user's configuration information for each OneWorld object.
There are two types of business object properties windows for business objects that map to interface classes. The first window, Capturing supports verbs to capture the supported verbs for all selected OneWorld objects. The second window, Capturing Method sequence for Verb ASI, captures the method sequence for each verb of each business object. For data structure business objects, one default verb is created, Execute, and this verb has no ASI.
OneWorld objects can have attributes and methods. The names of the business object definitions are derived from the OneWorld object names and appended with the business object prefix. If there are two business functions that use the same data structure class, the ODA generates multiple definitions with the same structure with the exception of a business function name in the business object ASI. The names of the business objects are incremental, starting with _1, _2... and so on. For example, if D0100033 is used by two functions, the business objects generated are D0100033, D0100033_1.
Get/Set Methods
For the OneWorld data structure object, the get/set methods have corresponding business object attributes. The type of the attribute is stored in the ASI as type=<type> and the actual name of the attribute is stored in ASI as name=<name>. For a combination of get/set, only one attribute is generated. For example, if an attribute name is ID, the methods are getID() and setID(). In this case, the business object has one attribute with the name ID and ASI as getter=getID();setter=setID(), where type=int, and name=ID.
Business function attributes
An attribute is created for each business function defined in the OneWorld interface java class. For proper representation of business function call, the type of this attribute will be a child business object containing attributes representing input parameters of the business function call. The name of the attribute would be the name of the business function and the type would be the name of the data structure business object. The attribute has an ASI that holds the name of the business function using the tag bfn_name=.
Business function parameters
The input parameters of a business function are represented as attributes. If the data type of a particular parameter is something that is unsupported by the WebSphere Business Integration format, they are represented as 'String'. Basically, the parameters are the variables defined in the data structure class. The ASI of a parameter stores the original data type value and name. For a list of supported parameters, see Business object attribute types.
Object types in OneWorld
There are two types of java classes present in OneWorld jars generated using GenJava:
The interface class files map to the library and an interface combination is defined in the iJDEScript file. The file has the signature for all the business functions as well as create<businessfunction>ParameterSet methods for the business functions that are imported in a specified interface.
If the file is as shown below:
login library JDEAddressBook interface AddressBook import B0100031 import B0100019 import B0100032 import B0100002 import B0100033 build logout
The class file for AddressBook.class would have method for B0100031 as well as Create<B0100031>ParameterSet. Where <B0100031> is the English text name of the business function.
The data structure class files maintain the get and set methods for all the parameters that are required as input for a specific business function.
You can specify business object information for business objects that map to interface classes. After you create a business object, you can specify the verbs that are valid for the object, the method sequence of a given verb on the object, the business object-level ASI, and the attribute-level ASI. This section describes how to specify this information, using the ODA with Business Object Designer. For a detailed description of these categories of information and what they mean for business object structure in the JD Edwards OneWorld connector, see Understanding business objects.
Selecting verbs
In Business Object Designer, if a selected business object maps to an
interface object in OneWorld, the first screen that appears when you finish
creating a business object and open it in a separate window is the BO
Properties - Select Verbs for component screen. Figure 9 illustrates this screen for the AddressBook business
object. For business objects that map the business functions of
XML List, a single verb execute is created.
Figure 9. Select verb for component screen
On this screen, you can specify the verbs that the business objects supports. You can specify the verbs that you need for a specific business object by typing the verb names and delimiting them with a ;. The verb names must follow the naming convention as specified in the Business Object Development Guide.
The standard verbs used in WebSphere Business Integration are Create, Retrieve, Delete, and Update. For details about business object verb ASI for the OneWorld connector, see Verb ASI.
Specifying the verb ASI
For each verb selected, a separate window appears where you specify the business function sequence that must be executed for the verb.
Figure 10 illustrates this screen for the Retrieve verb of the AddressBook business object under Business Functions, created in Figure 7 and Figure 8.
Figure 10. Setting the verb method sequence
From the Value list for the MethodSequence property, you can select the method that you want the business object to execute first for the verb. In Figure 10, the method sequence is as follows:
By specifying a business function sequence for the verb, you are creating the verb ASI that is associated with that verb. If necessary, this verb ASI can be modified later.
For each table that you select on the Confirm source node screen, seen Figure 8, subsequent properties windows are displayed to capture additional information.
There are three types of business object properties windows displayed for XML business objects:
Table types
The business object properties window displays the property names and property values. You can select the table type for each table. The drop-down menu allows single cardinality selection.
You can select from the following property values:
Figure 11. Select the table type for selected tables screen
Once the table type is selected, the ODA invokes the GetTemplate API for each table. The ODA prepares the XML document for the GetTemplate call and passes it to OneWorld. The response XML document gives the list of columns that are present in the table. The business objects generated have all these columns displayed as attributes in the business object.
Data selection
This business objects properties window, seen in Figure 12, captures the where clause properties for the columns of each table. This window is displayed for each table. The property names are the names of columns in the table. The property values represent the where clause parameters that have to be used for a column. This is populated only for columns that are part of the where clause. The format of the value must be:
clause type=<ClauseType>;
clause_seq=<Clause Sequence>;
operator_type=<Operator Type>;
The <Clause Type> is either WHERE, AND or OR. The <Clause Seq> is a number representing the order in which the columns are added in the where clause. The <Operator Type> can be one of the following values:
Figure 12. Prepare the where clause for table screen
Data sequencing
The data sequencing screen, seen in Figure 13, lists property names and allows you to select either ascending (ASCD) or descending (DSCD) sequencing order for a specific column from a drop-down menu.
Besides the type of sequencing, the adapter uses an ASI tag,
sort_order, to order the attributes when the ordering clause is
prepared. This property is not added by ODA; you must manually add
this property to the attribute ASI at the time you select the sorting
property.
Figure 13. Prepare data sequencing screen
The Business Object Wizard - Step 6 of 6 - Save business objects
screen appears with options to save a copy of the business objects to another
file, to open the new business objects in another window, and to shut down the
OneWorld ODA. If you choose to open the new business objects in another
window, the Business Object Designer displays a window where you can modify
the attributes for those business objects.
Figure 14. Save business objects screen
To open the business objects in separate window:
To save the business objects to a file (only after you a have specified a key for the parent-level business object):
Business Object Designer saves the files to the specified location.
If you have finished working with the ODA, you can shut it down by selecting the check-box, Shutdown ODA JD Edwards OneWorld ODA before clicking Finish.