Each OneWorld object has a corresponding business object.
The business objects for the JD Edwards OneWorld adapter can be of two types to support the Java APIs as well as the XMLList APIs from OneWorld.
The business objects that are processed using Java APIs have a type=BFN tag in the business object ASI that distinguishes them from XML List business objects. Within the business objects that are used for Java APIs, there are two types of business objects: one type that maps to the Interface class and another type that maps to a business function class. The business objects that map to the Interface class have ASI as follows:
type=BFN;class_name=com.JD Edwards.interop.AddressBook.JDEAddressBook
The business objects that are processed using Java APIs have a type=BFN tag in the business object ASI that distinguishes them from XML List business objects. Within the business objects that are used for Java APIs, there are two types of business objects: one type that maps to the Interface class and another type that maps to a business function class. The business objects that map to the Interface class have ASI as follows:
type=BFN;class_name=com.JD Edwards.interop.AddressBook.JDEAddressBook
All the business functions present in the class JDEAddressBook and present in the .jar file generated by GenJava are represented as child business objects to the main business object. All the child business objects for a top-level business object must map to business functions that can be access through one username and password. If a specific business function has a different username/password access, then that must be part of a separate business object hierarchy that has access to that username/password. Refer to Business functions for further details on how to define special access permissions for a business object.
Each data structure class present in the .jar file, generated from GenJava, maps to the corresponding business object. For example, in the JDEAddressBook example, the data structure names are:
D0100031 D0100019 D0100032 D0100002 D0100033
And, they map to business functions and child business objects created for B0100031, B0100019, etc.
The ASI for the above business objects has a tag for name= where the value is the name of the data structure. It also has a tag, bfn_name=, for the name of the business function that corresponds to these business objects.
The name of the attribute maps to the name of the method that is represented by the business object. For example, if the data structure is D0100033, the name of the attribute in the AddressBook business object would be GetEffectiveAddress. The ASI at this attribute level would give the name of the method using the ASI tag bfn_name=.
For each attribute present in the Data Structure class, a corresponding business object attribute is generated in the business function business object. The ASI for the attribute holds information about its type and name in OneWorld. For example, if the attribute type is JDEDate, then the ASI holds name=EffectiveDate;type=JDEDate. Besides some simple types of attributes, OneWorld supports two proprietary data types, JDEDate and JDEMathNumeric.
The following methods are available in this OneWorld Java class:
The values for attributes that map to OneWorld date fields are specified in the format MM/DD/YYYY. The adapter parses this string value and calls OneWorld APIs on the JDEDate object to set values for the day, month, and year. If the data from OneWorld has to be set in the business object, it uses the get methods to set value in the attribute.
The following methods are present in the JDEMathNumeric class:
The following table lists the data types supported by OneWorld and the
corresponding type in a WebSphere Business Integration business object.
Table 5. Business object attribute types
OneWorld type | Business object attribute type | ASI |
---|---|---|
JDEDate | Date | type=JDEDate |
JDEMathNumeric | Integer | type=JDEMathNumeric |
int | Integer | type=int |
boolean | Boolean | type=boolean |
char | String | type=char |
String | String | type=String |
short | Integer | type_short |
float | Float | type=float |
double | Double | type=double |
byte | String | type=byte |
long | Integer | type=long |
The OneWorld connector invokes all of the business functions in one doVerbFor() call in one transaction. If one of them fails, all of them will be rolled back. All the business functions within one business object execution must have access permissions from a single user. The user can be one that is created for the adapter and is maintained as a connection pool or it can be a specific user. You can specify a user for a business object by using a child business object of single cardinality with the type ACCESS_LEVEL.
For proper representation of business function calls, the business function is modeled as a child business object containing attributes that represent data structure variables.
The adapter supports the business objects that map to business functions to be executed independently. For all such business objects, the ASI contains the information required to execute the business function, for example, business function name, and the name for the data structure. The ASI for a business function business object, as above, can be represented as follows:
bfn_name=getEffectiveAddress type=BFN name=com.JD Edwards.interop.D0100031
The XML business objects map to the OneWorld table. The business object attributes map to the columns of the table.
If the components have columns with the same name, the ODA generates unique attribute names by appending them with "_" followed by a number. For example, if the field, AddressNumber, appears multiple times, the attributes generated will have names AddressNumber, AddressNumber_1, AddressNumber_2 and so on. The maximum length of the attribute is set, based on what is returned from the getTemplate() API call.
The following custom business functions are included and required for implementation of event notification in the adapter:
The following table details the event notification features supported by
the connector.
Table 6. Event table structure
Columns | Description |
---|---|
OBJ_KEY |
The unique identifier that identifies the business object row for which the event was created. If there are multiple attributes in a business object that make a key then the values are name value pairs delimited by ";" If the business object is of type business function, then the object key
should be as follows: DS0013keyattr1=123;
DS0013keyattr2=124. If the verb ASI for the retrieve
verb specifies multiple business functions, you might need to set multiple key
fields. That is supported since the adapter is using the data structure
name along with the attribute name, for example,
D0013.attr1=123;D0012.attr1=345.
|
OBJ_NAME | OneWorld business object for which the event was detected. |
OBJ_VERB | Verb for the event. |
EVT_PRIORITY | Event priority. |
EVT_STATUS | Event status. Initially set to READY_FOR_POLL. |
EVT_DESC | Any comment associated with the event. |
EVENT_ID | Unique ID of the event row. |
ADAPTER_ID | Identifies the connection in a multiple connector configuration. |
EVT_TIME | Event creation timestamp. |
ROW_ID | Archive record ID, generated by OneWorld. |
PROC_TIME | Event processing timestamp. |
Application-specific information for business functions provides the connector with application-dependent instructions on how to process business objects. If you extend or modify a business object definition, you must make sure that the application-specific information in the definition matches the syntax that the connector expects.
Application-specific information can be specified for the overall business object as well as for each business object attribute.
Object-level ASI provides fundamental information about the nature of a business object and the objects it contains. Business object ASI is in name-value pairs. Business objects that represent interface objects recognize the following ASI names:
Business objects map to business functions that are executed individually. For business objects that represent business functions, the adapter recognizes the following names:
For business objects that map to the Interface class, the Verb ASI contains a sequence of attribute names that map to business functions for the OneWorld BO Handler to call. The adapter invokes business functions in the sequence specified by the Verb ASI.
For business objects that map to business functions, the Verb ASI is blank.
The business objects that map to business functions have attributes that map to the get<Attr>/set<Attr> method combinations of the data structure class. The connector takes this data structure object as an input parameter when the function is invoked. For all such attributes, ASI stores the type of the attribute as type=<type> and the actual name of the attribute as name=<name>. The adapter generates only one attribute for a combination of get/set. For example, if an attribute name is ID, the methods would be getID() and setID(). The business object would have one attribute with name ID and ASI as getter=getID();setter=setID(), type=int, name=ID.
Table 7 describes the ASI for non-method attributes.
Table 7. Attribute-level ASI for non-method attributes
Attribute | Description |
---|---|
Name | Specifies the business object field name |
Type | Specifies the business object field type |
MaxLength | 255 characters, by default |
IsKey | Set to false. |
IsForeignKey | Set to false. |
IsRequired | Set to false. Set to true if the field is mandatory. |
AppSpecificInfo | This attribute is formatted as follows:
name=; type=; use_attribute_value=busobj.attrname(optional); getter=; setter=; |
DefaultValue | None |
Table 8 describes the ASI for non-method attributes.
Table 8. Attribute-level ASI for method attributes
Attribute | Description |
---|---|
Name | Specifies the business object field name |
Type | Specifies the business object field type |
Relationship | If the child is a container attribute, this is set to Container. |
IsKey | Set to false. |
IsForeignKey | Set to false. |
IsRequired | Set to false. |
AppSpecificInfo | None |
Cardinality | 1 |
Application-specific information for XML business object functions provides the connector with application-dependent instructions on how to process XML business object functions. If you extend or modify an XML business object definition, you must make sure that the application-specific information in the definition matches the syntax that the connector expects.
Application-specific information can be specified for the overall business object as well as for each business object attribute.
The business object ASI is type=XMLList. If the table type is not TABLE_CONVERSION, the following ASI must be present:
The table type can be one of the following:
This property is not used for XML business objects.
The attributes of the business objects map to specific columns of a table.
The following ASI are set for the following attributes:
The generic OneWorld business object handler handles processes that might call a set of business functions on components that are exposed through OneWorld components. It can also fetch data from OneWorld tables using the XML List feature of OneWorld. When a new business object enters the business object handler, it reads the business object ASI to determine if the adapter should invoke a business function or if it should create an XML document for XML List. The ASI tag type specifies the type of call. If type=BFN, then the adapter passes the call to the business function invoker that instantiates OneWorld Java objects and invokes business functions. If the ASI has type=XMLList, then the adapter generates the XML document for the CreateList API.