Introduction to the Expression Builder How to Use the Expression Builder What You Need to Know About Working with Expressions
4.10 Working with Expression Builder
Use the expression builder to create and edit expressions for Oracle Business Rules.4.10.1 Introduction to the Expression Builder
You can access the expression builder from different parts of Rules Designer, including in the Edit Globals dialog, and in the conditions area when you work with conditions in Decision Tables, and when you enter rules and Decision Tables in advanced mode with free form expressions selected. Working with Rulesets and Rules 4-59 Figure 4–71 shows the Rules Designer expression builder. Figure 4–71 Rules Designer Expression Builder4.10.2 How to Use the Expression Builder
In the expression builder when you double-click items in the Variables or Functions navigation trees, or in the Operators tab, or in the Constants tab, this inserts the item into the expression in the Expression area. You can also create or edit expressions directly by entering text in the Expression area. When you enter an expression, note that Variables are valid assignment targets and Constants are not valid assignment targets. Thus, you should use both tabs if you are unsure what type of item you want to add to the expression you are building. Specify an argument for a selected function by placing the cursor inside the function in the Expression field and double-clicking the expression or function to insert. For example, place the cursor inside the parentheses of a function and select a variable. This inserts the variable in the expression at the cursor position.4.10.3 What You Need to Know About Working with Expressions
XML fact types allow XML Schema types, elements, and attributes to be used when writing rules. Elements and types defined in XML Schema can be imported into the data model and can then be used to create rules and Decision Tables, just as with Java fact types and RL Fact types. The mapping between the XML Schema definition and the XML Fact types uses the Java Architecture for XML Binding JAXB. By default, Oracle Business Rules uses the JAXB 2.0 shipped with the Oracle Application Server. JAXB as defined in JSR-222 provides a mapping between the types, names, and conventions in an XML Schema definition and the available types, allowed names and 4-60 Oracle Fusion Middleware Users Guide for Oracle Business Rules conventions in Java. For example, an element named order-id and of type xsd:integer is mapped to a Java Bean property named orderID of type BigInteger and xsd:int type maps to Java int. You can use expressions in Oracle Business Rules. Expressions allow arithmetic using the operators , +, , , and other supported operators on primitive numerics, for example double, int, and the numeric types Integer, Long, Short, Float, Double BigDecimal, and BigInteger that are available in the built-in dictionary. For more information on supported primitive numerics, see Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules. Expressions allow casting between any two numeric types, for example, shortBigInteger1 + Long2 . Example 4–3 shows a few additional sample expressions. The expression processor uses the XPathXquery rules for type promotion XML Path Language XPath 2.0. For example, BigDecimal is promoted to floatdouble; type promotion going the other direction requires a cast, except for literals such as 3.3. Example 4–3 Sample Expressions in Actions with Types and Casting assign new double db = 3.3 assign new BigDecimal bd = 3.3 no cast required assign db = bd no cast required assign bd = BigDecimaldb cast is required4.11 Using Bucketsets as Constraints for Options Values in Rules
Parts
» Oracle Fusion Middleware Online Documentation Library
» What Are Rule Conditions? What Are Rule Actions?
» What Are Decision Tables? What Are Facts and Bucketsets? What Are Rulesets?
» Oracle Business Rules SDK Rules Designer
» Declarative Rules The RETE Algorithm
» How to Display and Edit XML Facts How to Reload XML Facts with Updated Schema
» What You Need to Know About XML Facts
» How to Display and Edit Java Facts What You Need to Know About Java Facts
» What You Need to Know About List of Values Bucketsets What You Need to Know About Range Bucketsets
» What You Need to Know About Bucketset Allowed in Actions Option
» In the Filter Query field, click insert test to insert a default test as
» How to Add Rules How to Define a Test in a Rule
» What You Need to Know About Advanced Mode Rules
» Introduction to Tree Mode Rules
» What You Need to Know About Tree Mode Rules
» How to Use Bucketsets to Provide Options for Test Expressions
» From the list next to the Add icon, select Rule.
» Introduction to Decision Table Operations
» Introduction to Decision Point API How to Obtain the Car Rental Sample Application
» How to Create Data Model Elements for Use with a Decision Point
» How to Add a Decision Point Using Decision Point Builder
» How to Create and Use Decision Point Instances
» What You Need to Know About Decision Point and Decision Tracing
» Testing Oracle Business Rules at Runtime Introduction to the Grades Sample Application
» Enter a name and test score and click Submit. This returns results as shown in
» Understanding Oracle Business Rules ADF Business Components Fact Types
» Understanding Oracle Business Rules Decision Point Action Type
» How to Call a Decision Point with ADF Business Components Facts
» How to Call a Decision Function with Java Decision Point Interface
» What You Need to Know About Decision Function Configuration with ADF Business Components
» How to Add the Outside Manager Finder Class
» How to Update ADF META INF for Local Dictionary Access
» How to Add the Employee Raises Java Class
» Working with Decision Component Metadata
» Introduction to Decision Components Decision Service Architecture
» Working with Advanced Mode Options
» Expression Builder Condition Browser
» Editing Decision Table Cells
» Understanding the Validation Panel Updating the Validation Panel
Show more