Sort in Rule Team Server uses alphanumeric values for priority instead of numeric values

Technote (FAQ)


Question

Why do the rules not appear sorted by priority ?

Answer

The priority can be expressed not only as a numeric value, but also as an expression in the rule language that can use a ruleset variable (i.e. dynamic priority). For more information on dynamic priorities, see:
The section on how to set simple priorities among rules: http://publib.boulder.ibm.com/infocenter/brjrules/v7r1/topic/com.ibm.websphere.ilog.jrules.doc/Content/Business_Rules/Documentation/_pubskel/JRules/ps_JRules_Global482.html
The section on the priority keyword in the technical rule language reference: http://publib.boulder.ibm.com/infocenter/brjrules/v7r1/topic/com.ibm.websphere.ilog.jrules.doc/Content/Business_Rules/Documentation/_pubskel/JRules/ps_JRules_Global1894.html

If you are only using numeric values in your rule projects, the best way is to use priorities with the same number of digits.

In addition, you can also customize Rule Team Server to automatically add any number of zeroes to the left of each priority, and ensure that they all have the same number of digits.
To this effect, you must define a custom session controller that will modify the priority of a rule just before any change is committed to the database (i.e. when you click on "finish" while editing a rule). This is done by overriding the onCommitElement() method of the interface IlrSessionController.
For more information on how to write a custom session controller, see:
http://publib.boulder.ibm.com/infocenter/brjrules/v7r1/topic/com.ibm.websphere.ilog.jrules.doc/Content/Business_Rules/Documentation/_pubskel/JRules/ps_JRules_Global1616.html
To get started with session controllers, check the "Related Information" of this page which contains links to two samples that implement a session controller (Permission management sample and Governance sample).


Cross reference information
Segment Product Component Platform Version Edition
Business Integration IBM Decision Center Modules:Rule Team Server Platform Independent 8.0, 7.5 All Editions

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

WebSphere ILOG Rule Team Server
General

Software version:

7.1.1

Operating system(s):

Platform Independent

Reference #:

1591819

Modified date:

2012-12-04

Translate my page

Machine Translation

Content navigation