Business Process Automation

Cross-Reference Instructions

Each business number rule has a rule definition. Rule definitions contain the instructions that the Business Number Generator (BNG) uses to create the sequence of numbers, letters, and other characters that comprise business number types. This is entered in the Rule Definition field in the Business Number Rule page.

Cross-reference instructions specify rule definitions that include other rule definition instructions and even entire business number rules. For example, the default Shipment Group business number rule cross-references the Shipment Group Date Rule business number rule.

Cross-reference instructions provide considerable flexibility because they consist of six types of arguments and can specify any rule definition instruction or business rule. The structure and syntax of cross-reference instructions is as follows:

{x: primary={instruction or rule 1}: alt={instruction or rule 2}: default=instruction or rule 3}

The cross-reference arguments (primary, alt, and default) are explained in the table below.

Note: Though cross-reference instructions can specify any type of instruction, typically only literal text, replacement instructions, and other business number rules will generate useful business numbers. In addition, cross-referenced business number rules must have the same business number type as the referencing rule.

In addition, there are more arguments (primary_domain, alt_domain and default_domain) that can specify the domain of the rule being looked up. These can be used to have several child or sibling domains all reference the same sequence in a parent or master domain, which could be done to have generated numbers in different domains all using a common sequence.

Note: This capability must be activated by setting the glog.server.bngenerator.xreference.crossDomain = on.

Cross-Reference Arguments

  • PRIMARY - Specifies the primary instruction(s) to be cross-referenced to the rule definition.
  • ALT - Specifies the first alternative instructions to be cross-referenced to the rule definition.
  • DEFAULT - Specifies the second alternative instructions to be cross-referenced to the rule definition.
  • PRIMARY_DOMAIN - Specifies the domain of the PRIMARY rule, overriding the current domain.
  • ALT_DOMAIN - Specifies the domain of the ALT rule, overriding the current domain.
  • DEFAULT_DOMAIN - Specifies the domain of the DEFAULT rule, overriding the current domain.

For example, the default Shipment Group business number has this rule definition:

{x: primary={r*: xml=TYPE}-{r*: xml=PARTY/ ORDEROWNER}: alt={r*: xml=TYPE}: default=SHP_GRP_DATE_RULE}

In this rule definition, the primary argument cross-references the Shipment Group Type ID followed by the Party/Order owner. If those cross-referenced instructions are not found, then the alt argument cross-references only the Shipment Group Type ID. If that is not found, then the default argument cross-references the Shipment Group Date Rule definition.

Anther example:

{x: primary={r*XML=TYPE}-{r*: xml=PARTY/ ORDEROWNER}: alt={r*xml=TYPE}: default_domain:MASTER: default=SHP_GRP_DATE_RULE}

As in the previous example, the primary and alt arguments specify rules in the current domain. The default argument, however, is referencing a common domain ('MASTER'), so that all Shipment Groups resolving to the default argument will use the same pool of numbers (e.g. Shipment Groups CHILD1.123 and CHILD2.123 could generate the numbers CHILD1.20030918-005 and CHILD2.20030918-006).

The settings for domain's key should be as follows:

primary_domain, alt_domain, default_domain,

These are case-sensitive and if you set them up wrong; for example, in upper case or with wrong spelling, a run time error will be reported. Following is an example:

{x: primary=SHP_GRP_DATE_RULE: Primary_domain=GUEST:
alt=SHP_GRP_DATE_RULE: alt_domain=DGANO:
default=SHP_GRP_DATE_RULE: default_domain=MASTER}

A runtime error will be reported: Primary_domain is not a valid argument.

When setting the domain name, it should follow the following format:

[ domain_key]=[ domain_value] not [ domain_key]:[ domain_value],

For example:

{x: primary=SHP_GRP_DATE_RULE: primary_domain=GUEST:
alt=SHP_GRP_DATE_RULE: alt_domain=DGANO:
default=SHP_GRP_DATE_RULE: default_domain=MASTER}

If you do not input the domain; for example, you do not set up the domain for primary_domain:

{x: primary=SHP_GRP_DATE_RULE:
alt=SHP_GRP_DATE_RULE: alt_domain=DGANO:
default=SHP_GRP_DATE_RULE: default_domain=MASTER}

When searching for primary bn_rule, current domain is used as primary_domain.

Related Topics