Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Tips for Working in the Rule Editor

Here are some tips for working with 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
It 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 run in a particular order, leave the Priority set to the default and let the runtime engine determine the rule order.
Declaring multiple terms of the same type
It 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 does not 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).

Tip: When you are 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.

Tips for Working in the Rule Editor
To do this... | Do this...
--- | ---
Switch Between Source and Form Editors | Click the bottom tab to switch between the source and form editors. The code remains synchronized. However, you cannot switch if there are errors in the code. First resolve the errors, then switch.
To Use Content Assist to Complete Values | The content assist feature helps you complete values using information that is available in resources. For example, if you type the name of a concept type (or its alias) and then a period, a list of the concept type properties appears for you to select from. 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 (and Uncomment) a Line | To comment out a line, or uncomment a line, press Ctrl+/ or select Edit > Toggle Comment from the context menu.
To Search for References | 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.
To Jump to the Definition of an Item | To jump to the location where an item is defined, you can use two methods. Click the item name and press F3, or right-click and select Open Declaration. Press and hold the Control key while you move (hover) the mouse over the text. When you hover over an item that displays an underline, Ctrl+click the item to jump to the place where it is defined. For example, you would jump from an alias to the declaration, and from an entity or entity property to the entity’s editor.

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.