Working with Advanced Mode Options

12-28 Oracle Fusion Middleware Users Guide for Oracle Business Rules For more information on number formatting in rules, see Section 12.4.1, What You May Need to Know About Localized Number Formatting Support in Oracle SOA Composer.

12.5.11 How to Work with Advanced Mode Rules at Run Time

In Oracle SOA Composer, you can work with advanced mode rules in a ruleset. For more information on working with advanced mode rules, see Section 4.7, Working with Advanced Mode Rules . To show and modify advanced mode rules: 1. In edit mode, select a ruleset of interest.

2. In the rule area, locate the rule where you want to show or modify advanced mode

rules.

3. Click Show Advanced Settings icon to show advanced settings. For more

information on showing advanced settings, see Section 12.5.4, How to Show and Edit Advanced Settings for Rules at Run Time .

4. If the Advanced Mode icon is not selected, then select the Advanced Mode icon.

This shows the advanced mode rule options, as shown in Figure 12–33 . Figure 12–33 Showing Advanced Mode Rule Options

12.5.11.1 Working with Advanced Mode Options

The Advanced Mode rules options enables you to create, modify, and delete patterns, as well as add, modify, and delete conditions and actions within a pattern. Using Oracle SOA Composer with Oracle Business Rules 12-29 Using the Advanced Mode rule options, you can: ■ Specify a pattern variable and select a fact type for the variable: You can directly enter the name of the pattern variable in the variable field. You can specify the fact type for the variable by using the fact type list as shown in Figure 12–34 . Figure 12–34 Specifying Pattern Variable and Fact Type In the graphic example, CustomerOrder is a pattern variable of CustomerOrder fact type. ■ Add a pattern: Click the Add Pattern icon to create a pattern to the existing rule. Figure 12–35 displays an added pattern. The newly created pattern is blank. Figure 12–35 Adding a Pattern ■ Delete a pattern: Click the Delete Pattern icon to delete a pattern from a rule. Figure 12–36 displays how to delete a pattern. 12-30 Oracle Fusion Middleware Users Guide for Oracle Business Rules Figure 12–36 Deleting a Pattern ■ Specify connectives: Two or more patterns are joined by a connective, and or or. You can use the connective link to toggle between the connectives. ■ Work with nested patterns: A nested pattern has patterns inside it. These are enclosed within curly braces {}. The pattern operator list is followed by the open curly brace. You can create a nested pattern by clicking Surround pattern with parentheses icon and you can remove the pattern nesting by clicking the Remove pattern nesting icon as shown in Figure 12–37 . Figure 12–37 Adding and Removing Pattern Nesting Inside the open curly brace, you can specify a pattern and then click the Insert Test link to add conditions to the nested pattern as shown in Figure 12–38 , as well as add another pattern to the same pattern block. Figure 12–38 Inserting Pattern Conditions A nested pattern block ends with a closing curly brace. You can have multiple levels of nested patterns, which means that inside a nested pattern, you can have Using Oracle SOA Composer with Oracle Business Rules 12-31 another nested pattern. You can click the Delete Nested Pattern Block icon to remove the entire nested pattern block as shown in Figure 12–39 . Figure 12–39 Deleting a Nested Pattern Block When you nest a pattern, an operator list is displayed with for each case where selected as the default operator in the operator list. The other items are there is a case where , there is no case where, and aggregate as shown in Figure 12–40 . Figure 12–40 Selecting the Pattern Operator The user interface remains the same as for each case where when you select there is a case where or there is no case where as the operator. However, when you select aggregate, the user interface changes. For an aggregate operator, you must enter a variable in the available field and select a function from the function list. The function list displays the following: ■ count ■ average ■ maximum ■ minimum ■ sum ■ collection Except for the count function, all the other functions require an expression. You can specify an expression in the available field or launch the Condition Browser window. Figure 12–41 displays a nested pattern, where numPricey is the variable name and count is function name. 12-32 Oracle Fusion Middleware Users Guide for Oracle Business Rules Figure 12–41 The Count Aggregate Operator

12.5.12 How to Work with Tree Mode Rules at Run Time