Reference Attributes in Business Rules

You can reference an attribute from a variety of sources in a business rule.

For example:

You can reference an attribute from a variety of sources in a business rule.

What the Numbers Mean

  1. The condition references an attribute that resides in an entity, such as the Customer attribute in the order header entity.

    If the Customer attribute in the Order Header entity equals Computer Service and Rentals
  2. The action references attributes and entities.

    Set the Latest Acceptable Ship Date attribute in the Order Fulfill Line entity to the same value that the Latest Acceptable Ship Date attribute in the Order Header entity contains.
  3. Order Management applies the rule at run time. Here's the pseudocode.

    The Customer attribute in the Order Header entity equals Computer Service and Rentals, and the Latest Acceptable Ship Date attribute in the Order Header entity contains 1/1/21 6:58 PM, so set the Latest Acceptable Ship Date attribute in the Order Fulfill Line entity to 1/1/21 6:58 PM.

General Guidelines

Note

  • Identify the attributes that you will reference in the rule. For example, Item Type and Shipping Instructions are each an attribute on the fulfillment line. For details about Order Management tables that these attributes reference, go to Tables and Views for Oracle Fusion Cloud SCM, then examine the Order Management chapter.

  • Add a default, catch all rule that can handle the situation where you must set an attribute value.

  • Make sure your rule can handle an attribute that doesn't contain a value, even for attributes that normally do contain a value.

    Note: If the attribute doesn't contain a value, and if your rule does a calculation that requires a value, then it might create an error or result in a null pointer exception at runtime.

    For example, an Order Entry Specialist might or might not set the value for an extensible flexfield because adding a value is optional. If your rule references an extensible flexfield, and if this flexfield doesn't contain a value at run time, then write your rule so it populates the flexfield with a default value that your rule can use during calculations.

  • You can reference a variety of attributes and entities.

Reference Extensible Flexfields

Referencing Extensible Flexfields

Apply guidelines when you reference an extensible flexfield in Visual Information Builder.

  • Its not necessary to examine the context for an empty value.

  • Your rule must examine the segment for an empty value.

  • Run the Publish Extensible Flexfield Attributes scheduled process whether you use Visual Information Builder or Oracle Business Rules. This scheduled process updates the rule definitions. You must run it each time you set up a new or modify an existing extensible flexfield so you can view and use them in the rule editors.

Apply guidelines when you reference an extensible flexfield in Oracle Business Rules.

guidelines when you reference an extensible flexfield in Oracle Business Rules

Note

  • Use isn't null to make sure the value of any attribute or object, such as the segment or context, that your rule references isn't empty. If your rule references an empty attribute, but depends on a value, then it might fail with unpredictable results.

  • Reference the context code, such as HeaderEFF.context.

  • Reference the segment name, such as HeaderEFF.getFlexAttributeDateValue("_CompleteCompliancedate").

  • If you reference a value set, then Oracle Business Rules uses the VALUE column, by default. If the value set.

    • Contains a value for ID. The editor uses the ID, and you must write the rule so it uses the ID.

    • Doesn't contain a value for ID. The editor uses the value.

    For example, if you write a rule that references a payment term, then you must make sure the value set includes a value for ID, and your rule must reference the ID.

Get more information.

Reference Order Promising

If you use Order Promising, then apply these guidelines.

f you use Order Promising, then apply these guidelines.

Note

  • Order Promising uses the Scheduled Ship Date attribute on the sales order only if you set the Override Schedule attribute to Yes. If you create a rule that references Scheduled Ship Date, then make sure you override the schedule.

  • Specify the warehouse, or specify the supplier and supplier site. It isn't necessary to specify scheduled arrival date.

  • If you don't make these settings, then Order Promising ignores the scheduled ship date that the rule sets.

Reference Item Attributes

You can reference an item attribute in an entity in Visual Information Builder.

referencing an item attribute in an entity in Visual Information Builder

Note

  • You can reference an item attribute from these entities.

    • Item Definition

    • Item Category

    • Related Item

  • These entities are children of the Order Fulfill Line entity, grandchildren of Order Line, and great grandchildren of Order Header.

  • You can reference an item attribute in Visual Information Builder or Oracle Business Rules.

  • Don't reference an item attribute that ends with suffix _OBSOLETE in the attribute name.