Creating and Maintaining Business Object Documents (BODs)
Use the following process to build or change a Business Object Document
(BOD) XML via metadata defined in system forms. BOD elements are often
mapped to objects in system tables or collections, although certain elements
may be specified as literals or calculated values that are not tied to
any table or collection.
In the Replication
Documents form, you specify the general structure and conventions
used by the BOD. Specify when the BOD is used through either the Replication
Document Outbound Cross References form or the Replication
Document Inbound Cross References. Then use the Replication
Document Elements and Replication
Document Attributes forms to define the elements (BOD tags) and the
attributes of those elements, and map the elements and attributes as required.
BOD Structure and Usage
- On the Replication Documents form, specify the document
name, used only for internal reference. The actual BOD XML document
name is specified by the BOD Noun and BOD Verb fields in the Primary
Tab.
- Enter information about the IDO used to build the BOD. If no existing
IDO collection fits the purpose of the BOD, you can define a new IDO
collection or custom load method specifically for the BOD.
- Click either the Inbound Cross-Refs or Outbound Cross-Refs
button to go to one of the following forms, where you can specify
how the BOD is used:
BOD Header
NOTE: This section applies only to
BODs intended for applications that use the standard Infor BOD format.
Generic BOD XMLs intended for other applications do not require these
BOD header elements.
- On the Replication Documents form, click the Add BOD
Headers Element button to automatically generate the header elements
required for any BOD.
- The Replication Document Elements form displays with the
appropriate header elements added.
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. (Click here
for more information about these macros.)
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.
Save the records and close the form.
- The Attributes form displays with the appropriate attributes
automatically defined for the header elements. Save the records and
close this form.
- If this BOD is used to publish deleted data, change the ValueExpresson
of the ActionCode attribute on the ActionExpression element of the
header from "Replace" to "Change".
BOD Body
- On the Replication Documents form, click the Elements
button to open the Replication Document Elements form again.
This time you will be adding elements to the body of the BOD, to produce
all the necessary tags for the BOD.
- For each element (tag), set up the following:
- For the BOD Tag Name, enter the actual tag included
in the XML.
- Specify whether the value of the element is a literal value,
a dynamic subcollection, or a property (that is, mapped to a data
element in an IDO collection). If you are adding a dynamic subcollection,
see Adding
a Collection of Elements from a SQL Table or IDO to a BOD
for more information.
- If the value is a literal, enter the Value Expression.
If the value is a dynamic subcollection, enter the Dynamic
Subcollection IDO Name. If the value is a property, enter
the Property Name. The property name you enter is a property
on the IDO listed on the parent BOD form, or a property on a subcollection
IDO linked to that IDO.
- If the value is an explicit
"To" logical ID, select Is To Logical ID.
- On the Subcollections tab, specify information about any custom
load methods, filters, overrides, or Link By information for subcollections.
- If any element includes an attribute - that is, the BOD tag looks
like this:
<element attribute=xxx>
then click the Attributes button to display the Replication
Document Attributes form, filtered for the current element. (Notice
that the element's sequence number is displayed for reference.)
Specify the following for the attribute:
- for the Attribute Name, enter the actual attribute included
in the XML. The attribute name is case-sensitive.
- Specify 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, enter the Value Expression.
If the value is a property, enter the Property Name. The
property name you enter 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 following
XML element:
<DocumentData TargetSite="target_site" SourceSite="source_site" Verb="verb" Noun="noun">
- When building BODs for applications that do use the Infor BOD format,
be aware of the following:
- For the main ID element in the Noun section of the BOD
(this is often, but not always, called DocumentID):
- Specify the BOD Tag Name.
- Set Value Type to Literal.
- Set Property Name to 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 elementsin
the Noun section of the body need to be mapped: the main ID element
and the status element.
All values published in an ID element or reference ID element
must have leading spaces trimmed. If an ID element is populated
with concatenated columns of data each column of data must have
leading spaces trimmed.
The following example shows concenation and trim logic:
ltrim(VendVch.vend_num) + '~' + ltrim(cast(VendVch.voucher as nvarchar(7)))
If vend_num = 200 and voucher = 5000 then the value published
would look like this:
200~5000
- If a parent tag contains no data and has no attributes, you do
not need to define an element record for it in the metadata. If a
child tag element is defined in the Elements form, the system automatically
generates the parent tag in the XML. For example, if you define metadata
for
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, like this:
<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 ~ (tilde). For example,
if concatenating cust_num and cust_seq together to be published together
as one value in an element, specify it as follows:
cust_num~cust_seq
If cust_num = C000001 and cust_seq = 5 then the value published
looks like this:
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/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 (via
a remote method call) in the actual application.
Next Step
After you define the replication document mappings for a BOD, you must
set up replication for it. See Replicating
Data as BODs to Other Infor BOD-Enabled Applications. Or, if you are
defining generic (non-Infor) BOD XML documents, see Replicating
Data to External Systems That Do Not Use Infor BOD Formatted XMLs.
If you update a replication document for a BOD that has been replicated
previously, you should restart the ReplQListener service to clear the
cache of old metadata for the BOD.
Generating Replication Document Scripts
Use the Repl
Doc Script Generator form if you want to generate a replication
document script and then, optionally, check the script into a source code
control system. This allows you to include your custom replication document
information in system upgrades.
Related Topics
Deleting BODs
Viewing Received and Sent BODs
Replicating Data as BODs
to Other BOD-Enabled Applications
Replicating Data
to External Systems That Do Not Use Infor BOD Formatted XMLs
Adding a Collection
of Elements from a SQL Table or IDO to a BOD
Behind the Scenes:
How the System Generates a BOD