Use the Business Rules Editor
Use an editor to edit Oracle Business Rules.
Summary of the Steps
-
Access the rule editor.
-
Add the If statement.
-
Add the Then statement.
Access the Rule Editor
-
In the Setup and Maintenance work area, go to the task.
-
Offering: Order Management
-
Functional Area: Orders
-
-
Open one of these pages.
-
Manage Orchestration Process Definitions
-
Manage Product Transformation Rules
The page you access depends on the set up you must do. For this example, you modify an orchestration process definition, so open Manage Orchestration Process Definitions.
-
-
Access the rule editor.
You access the rule editor in different ways, depending on the page you use. For this example, you click Click for Rule in the Pause Rule column on the step of an orchestration process. Examine an example. For details, see Pause Orchestration Processes for Events.
Add the If Statement
You will create this statement.
Do it.
-
Click the magnifying glass (Left Value) to access the Condition Browser.
The Condition Browser displays objects that come predefined in the dictionary. It also displays objects that you assert into the dictionary while you create your rule.
The browser filters the items it displays according to where you access it. This behavior helps make sure you only select objects that make sense in the context where you access the browser. For example, here's the dictionaries that the browser displays when you create a start-after condition.
-
Expand the DooSeededOrchestrationRules dictionary.
The browser displays the objects that this dictionary contains, including facts, variables, and so on.
You usually use only some of the objects that are available in the dictionary. For example, here are the objects you typically use in the DooSeededOrchestrationRules dictionary.
-
Result
-
Date
-
Timestamp
-
DOOHeader
-
SacResult
-
DOOFLine
Get assistance from Oracle to use other objects or other dictionaries.
-
-
In DooSeededOrchestrationRules, expand DOOFLine, then notice the attributes. These attributes display on the order fulfillment line in the Order Management work area.
where
Browser Text
Description
DOOFLine
Fact in the DooSeededOrchestrationRules dictionary
DOO
Abbreviation for distributed order orchestration, which is an earlier name for order orchestration.
FLine
Abbreviation for fulfillment line.
billToCustomerId
Fulfillment line attribute. This attribute stores an identification number for the customer. Its the same number that displays in the Order Management work area.
toString
Includes conversions you can make on the attribute.
A sales order uses the demandClassCode attribute to allow you to classify the customer. Assume your rule must examine the value of demandClassCode, so scroll down, click demandClassCode, then click OK.
The rule editor adds the attribute to the statement.
-
Click Right Value (the magnifying glass) to access the Condition Browser.
The Right Value window specifies the value that the If statement uses to determine whether its True. Similar to Left Value, you can expand DooSeededOrchestrationRules to access objects in the dictionary. You can also specify a string.
For this example, enter
"GOLD"
in the window, then click OK. You must enclose the string with double quotation marks.
Add the Then Statement
-
In the Then area, click Add Action > Asset New.
Select an action. For this example, you will assert the Then statement as a new fact into the dictionary.
Action
Description
Assert
Add a fact into the dictionary.
You can also reassert an object. A reassert updates the dictionary so it reflects the new state of the object whether or not you changed the object.
Reassert doesn't create a fact. If your rule requires more than one fact for a fact type, then you must assert each of these facts as a separate object.
Assert New
Add a new fact into the dictionary.
Assign
Assign a value to a variable in the dictionary.
Call
Call a function from the dictionary.
Modify
Modify a data value that's associated with a matched fact in the dictionary.
Retract
Remove a fact from the dictionary.
Other Actions
Advanced mode displays more actions, but you don't use most of them. For details, see the How to Use Advanced Mode Action Forms section in User's Guide for Oracle Business Rules.
-
Click Select a Target.
The target specifies the object this rule will modify if it evaluates to true.
For this example, select object SacResult, where sac means start after condition. The rule will modify this value.
-
Click Edit Properties.
If you click Edit Properties, the rules editor gets the properties of the object that you selected as the target, then displays them in the Properties dialog. In this example, it displays the properties of SacResult.
-
In the reevaluateFlag row, in the Value column, enter
"N"
. You must include the double quotation marks.Each target contains a different set of properties, so you must set them differently depending on your business requirements. In this example, reevaluateFlag specifies to evaluate the result of the start after condition again after the rule runs. You don't want this reevaluation, so set reevaluateFlag to N.
-
In the Value column, click Value (the magnifying glass).
Use the sacType property to specify the action to take when the If statement evaluates to true. In this example, you must pause the orchestration process while it waits for an event to happen. The EVENT pause type causes the orchestration process to pause, so you set sacType. Learn how to set properties for the start after condition. For details, see Pause Orchestration Processes for Events.
-
In the Condition Browser, expand DooSeededOrchestrationRules > SacResult, click SAC_TYPE_EVENT, then click OK.
-
Verify that the Properties dialog displays your settings, then click OK.
Notice that the Then area displays a string representation of the properties you set. Use this string to quickly assess the action the rule will do. Here's the complete business rule.