Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 16 Rules and Rule Functions : Tips for Working in the Rule Editor

Tips for Working in the Rule Editor
This section has some tips to help you work in the rule editor.
Switching between Form and Source Editors
You can freely switch between form and source editors for rules and rule functions. In each case the editors stay synchronized with the latest changes.
You cannot switch from the source editor to the form editor if there are any syntax or resolution errors in your code.
The Priority setting is used by the runtime engine when determining the order in which rules are fired. Rules with a number closer to one fire first. When there is no reason to force rules to execute in a particular order, leave the Priority set to the default and let the runtime engine determine rule order.
Declaring multiple terms of the same type  Allows the rule to consider multiple instances of the corresponding entity. Specify different aliases to keep the terms distinct
Scorecards  Scorecards are like concepts except that there is only one instance of a scorecard (or more accurately, one instance per agent when multi-engine features are used). It is therefore not necessary to put scorecards in the declaration of a rule because a scorecard never requires an alias. You can use scorecard properties in conditions (just as you would concept properties). However, because a scorecard doesn't have an alias, refer to it like a function, for example, Folder.Folder.Scorecard.prop1
Standard Eclipse Features
In addition to some TIBCO BusinessEvents-specific features, the source and form rule editors support standard Eclipse functionality such as the following: Undo and redo; copy and paste; breakpoint features; standard text annotations (which can be changed using Preferences); text folding (source editor only); Java outline view (source editor only).
When you’re working in the source editor, press Ctrl+Shift+L to see a list of keyboard shortcuts available in that context. (This is a general Eclipse feature.)
Information Highlighted
Keywords, variables, and functions are highlighted in the text. Also, when you hover the mouse over a resource such as a concept, event or function, information about it displays in a tooltip.
Syntax and resolution errors are automatically flagged by visual cues. They are underlined and also display in the vertical and overview rulers.
Miscellaneous Tips
Some other tips are highlighted below.
The selection list also appears when the cursor is in an appropriate location and you press Ctrl+Space, or if you right click and select Edit > Content Assist from the context (right-click) menu.
To comment out a line, or uncomment a line, press Ctrl+/ or select Edit > Toggle Comment from the context menu
When the cursor is placed in an appropriate item in the code such as an entity or function name, you can find all references to that item references in the rule code. Press Ctrl+Shift+G, or select Search > Search for References from the context (right-click) menu. The item references are highlighted in the text, and an arrow appears in the vertical ruler.
Click in the item name and press F3, or right-click and select Open Declaration.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved