About BOD Elements and Attributes
This topic includes miscellaneous information that you can use when you create BOD (Business Object Document) replication documents.
The BOD Header
The BOD_Name/ApplicationArea/BODID element contains the NID in this format:
NIDID(DerBODID)?BODNOUN()&verb=BODVERB()
In most cases, you do not need to edit this element. However, if you want the NID's location value populated, change the NIDID macro to LNIDID.
See Value Expression, Replication Document Elements.
When you create the associated IDO or custom load method used to populate the BOD, you must include a property named DerBODID that contains the key value for the BOD. For example, for the PurchaseOrder BOD, you must define a DerBODID property that contains the purchase order number.
The BOD Body
When adding elements to the body of a BOD, on the Replication Document Elements form, specify this information:
- A BOD Tag Name or the actual element tag
- A Value Type of the element,
whether the value is Literal, PropertyTag, or DynamicSubcollection
- If you select Literal, specify the literal expression or macro expression in the Value Expression field.
- If you select PropertyTag, specify the property name that is mapped to a data element in an IDO collection in the Property Name field.
- If you select
DynamicSubcollection, specify
the other collection IDO name in the Dynamic Subcollection IDO Name
field.
See Adding a Collection of Elements from a SQL Table or IDO to a BOD.
- Any additional information required by the Value Type for the element
If any element includes an attribute that is a BOD tag or is similar to this example:
<element attribute=xxx>
Then, select the
tab. Notice that the element's sequence number is displayed for reference.On the Attributes tab, specify this information:
- An Attribute Name or
the actual attribute included in the XMLNote: The attribute name is case-sensitive.
- A Value Type, whether
the value of the attribute is a literal value or a property that is mapped to a
data element in an IDO collection
- If the value is a literal, specify the Value Expression.
- If the value is a property, specify the Property Name. The property name is a property on the IDO listed on the parent BOD form, or a property on a subcollection IDO linked to that IDO.
Tips for Constructing the Body
- An XML document inbound to
this application from an application that does not use the Infor BOD format must
include the this XML element:
<DocumentData TargetSite="target_site" SourceSite="source_site" Verb="verb" Noun="noun">
- When building BODs for
applications that use the Infor BOD
format, be aware of this information:
- For the main ID element in the
Noun
section of the BOD, or sometimes called DocumentID, perform these steps:
- In the BOD Tag Name field, specify the element tag name.
- In the Value Type field, select Literal.
- In the Property Name field, specify DerBODID.
- For reference elements, the ID should be populated with the key value (DerBODID) used by the BOD being referenced.
- If the BOD is used to publish deleted data, only two elements in the Noun section of the body must be mapped. These elements are the main ID and the status.
- All values published in an ID
element or reference ID element must have the leading spaces trimmed. If
an ID element is populated with concatenated columns of data, each
column of data must have the leading spaces trimmed.
This example shows concatenation and trim logic:
ltrim(VendVch.vend_num) + '~' + ltrim(cast(VendVch.voucher as nvarchar(7)))
If vend_num = 200 and voucher = 5000 then this value published:
200~5000
- For the main ID element in the
Noun
section of the BOD, or sometimes called DocumentID, perform these steps:
- If a parent tag has no data
and attributes, you do not need to define an element record for the tag in the
metadata. If a child tag element is defined in the Replication
Document Elements form, the system automatically generates the
parent tag in the XML. For example, if you define metadata for this element:
ProcessCustomerPartyMaster/DataArea/CustomerPartyMaster/Location/Name
but you have not defined metadata for the parent:
ProcessCustomerPartyMaster/DataArea/CustomerPartyMaster/Location
the system includes any missing parent tags in the XML:
<DataArea> <CustomerPartyMaster> <Location> <Name>MyCo</Name> </Location> </CustomerPartyMaster> </DataArea>
- When an element is
populated with multiple columns of data concatenated together, the approved
concatenation character is ~ or tilde. For example, if you concatenate cust_num
and cust_seq together to be published together as one value in an element,
specify cust_num~cust_seq.
If cust_num = C000001 and cust_seq = 5, then the value published is C000001~5.
- Use the Documentation tabs and fields on the various forms to enter implementation information for the BOD and its elements and attributes. This information can be used to create data mapping or implementation reports.
- You can create a custom
load method whose source is a view that contains all the information you need in
the BOD. The CLM returns the result set of the view. This may produce speed
improvements over using an IDO. Note: If this application is used only to facilitate integration between two other applications, then the CLM in this application runs a corresponding CLM, through a remote method call, in the actual application.
- Method overrides on inbound BODs cannot handle null values in numeric
properties as a parameter. This is a restriction of the Microsoft Common Runtime
Language (CRL).
For example, the inbound BOD calls an override for an update similar to:
UPD(LoadCodeSp(OperNum,P3,InputPlanQty,MESSAGE))
If the InputPlanQty property is mapped to an XML element that is not always provided, there would be a problem. This could be resolved by modifying the InputPlanQty property to be a string instead of a number, and handling any necessary conversions inside the LoadCodeSp method/procedure. Numeric values cannot hold a null value in CRL, but string values can.
- To construct the replication document using an XML document as a
template:
- In the From Template and Versions fields or the From File field, select the BOD XML file.
- Click
When you double-click on a tag or a part of the BOD tree, the part’s path is copied into the BOD Tag Name field.
Note: The template or loaded BOD is not row-based and is not saved with the Replication Document Elements form's data. The BOD tree is removed when you close the form.
. The BOD tree is displayed.
Generating Replication Document Scripts
To generate a replication document script, use the Repl Doc Script Generator form and then, optionally, check the script into a source code control system. This process includes your custom replication document information in system upgrades.