Create Different Types of Business Rules
Apply guidelines to help you create different types of business rules.
Transformation Rule
Note
-
Use the Then statement to set the values.
-
Use a product transformation rule to add a new order line or to delete an existing one.
Here's some code that adds a new fulfillment line for item 12345678.
OrderTransformationRules.AddNewOrderLine (newItemId:12345678, viewRowImpl:fline.viewRowImpl)
This code deletes the fulfillment line that references item 12345678.
OrderTransformationRules.DeleteOrderLine (fulfillmentLineId:12345678, viewRowImpl:fline.viewRowImpl)
-
Use a posttransformation rule to modify an attribute on a new order line.
-
Use the ModifyEntity function to set a value.
This example code modifies the ShippingInstructions attribute. It sets the contents of the attribute to the text
Sales credits are 17.
PostTransformationRules.ModifyEntity(attrName:ShippingInstructions, attrValue: "Sales credits are 17.")
-
Make sure you use each rule only to do work for its intended design. For example, use a product transformation rule only to transform an item. Don't use it to implement some other functionality.
-
If the order header and the order line contain the same attribute, such as the Freight Terms attribute, and if you need to transform the value on the line, then use a posttransformation rule. Don't use a pretransformation rule. Order Management cascades values from the header to the line when you click Submit, so it will replace the value that you set with a pretransformation rule with the value from the header. But a posttransformation rule runs after you click Submit and after Order Management cascades values.
Interface Routing Rule
Note
-
Use parameters, such as Maximum Lines to Aggregate, to aggregate the lines you send to your fulfillment system.
-
For details, see Manage Routing Rules.
-
Run several tests and measure the results. Optimize values for each parameter after each test.
-
Don't create a routing rule that depends on a pause task and that sets the connector. For example, if you use Visual Information Builder, don't create a rule that's similar to.
If Task Type is equal to pause, then set connector name to Fusion-Reservation.
If you use Oracle Business Rules, don't create a rule that's similar to.
If header.Task Type is "Pause", then Set Connector Name ( "Fusion-Reservation" )
Compensation Pattern
Note
-
Use Advanced Mode.
-
Use the Assign action.
-
Assign a value for the compensation pattern. For example:
Assign header.mRuleDecision.compensationPattern = "CANCEL_CREATE"
-
Don't use this rule to set the default value for any other attribute.
Cost of Change Rule
Note
-
Use Advanced Mode.
-
Use the Assign action.
-
Assign a numeric value, such as 10 to costOfChange. For example:
assign Header.mRuleDecision.costOfChange = 10
-
Don't use this rule to set the default value for any other attribute.