Use Extensible Flexfields in Advanced Transformation Rules

Use an extensible flexfield in a decision table to implement more complex logic.

This example uses business rules to transform an item. It replaces a general item with a server, laptop, and handheld device. It makes the replacement according to the product type and a Boolean value in an extensible flexfield segment.

Here's the rule you create. For details, see Overview of Using Business Rules With Order Management.

Extensible Flexfields in a Advanced Transformation Rules

This example includes.

  • A decision table that manages a set of rules

  • header as an alias for the order header object

  • line as an alias for the order line object

  • fline as an alias for the fulfillment line object

This example includes extensible flexfield details.

  • Extensible flexfield named ProductInfo

  • flineEFFctgry for the extensible flexfield category

  • flineEFFcntx for the extensible flexfield context

  • An underscore ( _ ) before the name of the extensible flexfield segment

You will use Root Mode to set up the hierarchy.

Order Header
  orderLine
    orderFulfillLine

where

  • Order Header is the root

  • orderLine is a child of Order Header

  • orderFulfillLine is a child of orderLine and a grandchild of Order Header

Summary of the Set Up

  1. Create the IF statements and tests.

  2. Create the decision table.

This topic uses example values. You might need different values, depending on your business requirements.

Create the IF Statements and Tests

You will create IF statements and tests.

the IF Statements and Tests

Do it.

  1. Go to the Setup and Maintenance work area, then go to the task.

    • Offering: Order Management

    • Functional Area: Orders

    • Task: Manage Product Transformation Rules

  2. On the Manage Product Transformation Rules page, in the View list, click IF/THEN Rules.

  3. Click Properties.

  4. Create a rule.

    Attribute

    Value

    Effective Date

    Always

    Priority

    Medium

    Active

    Contains a check mark

    Advanced Mode

    Contains a check mark

    Tree Mode

    Contains a check mark

  5. Set the root.

    Attribute

    Value

    Root

    DooSeededOrchestrationRules.DOOHeader

  6. Create IF statements.

    • header is a OrderTransformationRules.HeaderVO

    • line is a header/OrderLine

    • fline is a header/OrderLine/OrderFulfillLine

    • flineEFFCtgry is a OrderTransformationRules.j_FulfillLineEffDooFulfillLinesAddInfoprivateVO

    • flineEFFCnts is a OrderTransformationRules.FulfillLineEffBProductInfoprivate

  7. Create tests.

    • flineEFFCtgry isn't null

    • flineEFFCntx isn't null

    • fline.FulfillLineEffCategories is flineEFFCtgry

    • flineEFFCtgry.FulfillLineEffBProductInfoprivateVO isn't null

    • flineEFFCtgry.FulfillLineEffBProductInfoprivateVO contains flineEFFCntx

Make sure you include a hierarchy test when you create extensible flexfield variables. The extensible flexfield in this example is ProductInfo. It contains the segment _CoverageProduct that you will use as a condition in the decision table.

Create the Decision Table

Here's the decision table you will create.

the Decision Table

Note

  • Create a condition that examines the _CoverageProduct extensible flexfield segment and fline.ItemTypeCode attribute.

  • The actions modify the fline.InventoryItemId attribute to transform one product to another product, and also modify the fline.ReservableFlag attribute.

  • A business rule can't modify the value of an extensible flexfield.

  • The ModifyEntity function modifies attribute values.

If each of your business rules.

  • Use the same value. You can create them as part of the condition.

  • Don't use the same value. You must set option Parameterized for the condition so the rule can set a different value for each rule. Some actions in the decision table in this example return the existing product value instead of a substitution. Also, some actions aren't active for some rules. To make an action active, make sure the option above the value contains a check mark.