Copyright © TIBCO Software Inc. All Rights Reserved |
This section provides some tips on working in the rule editor. The rule editor is used for TIBCO BusinessEvents rules, rule functions, and state machine rules.Do not enter the catalog name, which appears in the list of catalog functions in the Catalog functions View, and looks like a top-level folder provided catalog names are CEP Query, RDBMS, and Standard.Type a period at the end of the folder name. A popup window shows all folders and functions within the folder whose name you typed. For example type Database. to see a list of all functions in the Database folder.Drill down on categories within the catalog to expand to lists of functions and drag the desired function to the rule editor.
2. Provide parameter values as indicated by the tooltip. You can hover the cursor over a function to display a tooltip showing the function’s arguments. You can also see the tooltip contents in the online reference, TIBCO BusinessEvents Functions Reference.See Overview of Catalog Functions for descriptions of the various function catalogs, and an explanation of the decorations that appear on many function names.To use a global variable in the rule editor, use one of the System.getGlobalVariableAs* functions. For example:System.getGlobalVariableAsString("Hostname", "Localhost")Where Hostname is the name of the variable and Localhost is an optional literal value to use if the variable is not found.See Working with Global Variables for more details about global variables.For functions known as mapper functions you can use the Function Argument Mapper to map inputs from a source to the function arguments.See Chapter 19, Mapping and Transforming Data for a reference to using the Function Argument Mapper.You can open the Function Argument Mapping Wizard in various ways. For example here is one way:
1. In the rule editor, type the category of function you want to use. A list of functions in that category appears.
2. Select a mapper function from the list of functions in that category. The function argument area contains the text "xslt://".
3. Control-click the text "xslt://" to display a hypertext link. Click the link to open the Function Argument Mapping Wizard.
• Type the name of a mapper function category into the Actions or Conditions areas, then type an open parenthesis ( "(" ) TIBCO BusinessEvents displays "xslt://". Control-click to open the Function Argument Mapping Wizard.
• Type the entire string to specify the function category path and name, followed by ("xslt://"). Then control-click the text "xslt://" to open the Function Argument Mapping Wizard.See Chapter 19, Mapping and Transforming Data for full details on using the wizard. This section provides summary information only.
1. In the Function section, take appropriate action. For example, if you are using Instance.createInstance(), you would click the browse icon () to the right of the Entity Path field and select a concept type so you can create an instance of it.
2. Select a resource and click Apply.
3. Select the Input tab. TIBCO BusinessEvents displays a list of variables associated with the project on the left and a list of properties for the selected resource type on the right.
6. If you want to define the arguments using more complex logic, type the code or click the XPath Formula Builder () button to use the XPath Formula Builder. See Chapter 20, XPath Formula Builder.
7. Click OK.
Array index difference In the TIBCO BusinessEvents language, array indexes start from zero (0). However, in XSLT and XPath languages, they start from one (1). It’s important to remember this difference when using the rule language in the rule editor, and when working in the XSLT mapper and the XPath builder.
Copyright © TIBCO Software Inc. All Rights Reserved |