Parameter Generation Reference Information
Schema for Business Number Parameter Generators
The business number parameter generator uses a business number (BN) rule to define a pattern for the parameter value. A special replacement pattern segment (r*) is available to allow document and owner information to be part of the final value. The information is provided as an XML document and can be used with rudimentary XPath-like expressions in the pattern. Refer to online help for a comprehensive discussion of business number rules.
All business number rules used for document parameters must have the BN Type of CMS_FIELD. This, in turn, uses the DOCUMENT_DEF_XID BN Context to generate replacement information. The schema for the information is shown in the Schema for CMS_FIELD BN Rules figure below.
Assume you wanted to pass a document parameter for the logistics party. By using a BN Rule with pattern:
{r*:xml=OWNER/PARTY/LOGISTICS}
you extract out the LOGISTICS party from the list of involved parties associated with the
owner of the document.
Business Number Parameter Generators and Domains
In Oracle Transportation and Global Trade Management Cloud, a business number rule is identified by its XID. When running the rule, the system checks for a BN rule record in the current domain with an XID matching the rule. This has the advantage that a single rule can vary patterns by domain. But it increases the complexity of defining a BN rule to be used across many domains.
Consider an example where you want to apply a BN rule, LOGISTICS, to populate an xLogisticsParty parameter on all applicable documents. Assume you have a PUBLIC Content Management System WCC, representing the WebCenter Content instance that will receive the custom parameter. To assign a parameter generator for xLogisticsParty, you create a PUBLIC parameter generator LOGISTICS that maps to a PUBLIC BN rule of LOGISTICS. But when the rule runs, it searches for the LOGISTICS rule in the domain of the document. So you need to duplicate the PUBLIC LOGISTICS rule in every domain it may run in.
SQL Statement Assumptions for SQL Parameter Generators
A SQL parameter generator runs a single-column SQL select statement and retrieves the first record of the result set. It returns the column value for the result set as the parameter value. The SQL statement optionally accepts the document owner GID as a single bind parameter.
Examples:
select 'OTM-' || document_cms_seq.nextval from dual
select shipment_refnum_value from shipment_refnum where shipment_refnum_qual_gid = 'BOL' and shipment_gid=?
Interface Requirements for Java Parameter Generators
For document parameters too complex for a Business Number or SQL rule, the system can be extended with a Java plugin to delegate parameter generation to a custom Java class. This is recommended only for advanced Oracle Transportation and Global Trade Management Cloud implementation teams.
To create a Java parameter generator,
- create a Java plugin of type Parameter Generation. This is accessed from Configuration and Administration > Power Data > General > Java Plugins.
- the Java class specified in the plugin must
implement
glog.server.document.cms.CmsParamJavaPlugin.
- create a Document Parameter Generator of type Java Plugin. The created plugin should appear in the drop-down list.
The CmsParamJavaPlugin interface requires implementation of a single generate method:
public String generate(String ownerDataQueryType, String ownerGid,
T2SharedConnection conn) throws GLException;
Given the document owner and a database connection, the method returns the parameter value.