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.
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
-
Create the IF statements and tests.
-
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.
Do it.
-
Go to the Setup and Maintenance work area, then go to the task:
-
Offering: Order Management
-
Functional Area: Orders
-
Task: Manage Product Transformation Rules
-
-
On the Manage Product Transformation Rules page, in the View list, click IF/THEN Rules.
-
Click Properties.
-
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
-
Set the root.
Attribute
Value
Root
DooSeededOrchestrationRules.DOOHeader
-
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
-
-
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.
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.