<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Nothing out-of-the-box afaik.<br>
<br>
Take a look at dynamic salience expressions -
<a class="moz-txt-link-freetext" href="http://blog.athico.com/2007/05/dynamic-salience-expressions.html">http://blog.athico.com/2007/05/dynamic-salience-expressions.html</a><br>
Also note that dynamic salience can also be determined with a
function call, for example:<br>
<br>
package com.sample<br>
public class MyClass {<br>
...<br>
public static int uniqueSalience(String ruleflowGroup) {<br>
// return and maintain unique salience contract ..implement
yourself<br>
}<br>
...<br>
}<br>
<br>
and in your drl for example:<br>
<br>
package com.sample<br>
import function com.sample.MyClass.uniqueSalience;<br>
<br>
rule "testrule"<br>
ruleflow-group "abc"<br>
salience (uniqueSalience("abc"))<br>
when<br>
...<br>
then<br>
...<br>
end<br>
<br>
Hope this helps some.<br>
<br>
Thanks.<br>
Tihomir<br>
<br>
<blockquote
cite="mid:FC3EBB36-AE1D-4A4F-BD5C-BD7CF53DE69F@gmail.com"
type="cite">Is it possible in Drools to enforce a unique salience?<br>
<br>
Ideally this would be done at the point of entering a new rule.<br>
<br>
For example, if a rule existed with salience of 17 and a user
tried to add a<br>
new rule of salience 17, an error message would be generated
saying<br>
'salience level already in use'.<br>
<br>
Even better would be the ability to enforce a unique salience for
rules<br>
belonging to a particular ruleflow-group.<br>
<br>
The reason for wanting to achieve this is to prevent indeterminate
behaviour<br>
when two or more rules exist with the same salience level.<br>
<br>
Any help would be much appreciated.<br>
<br>
Regards,<br>
<br>
Barnaby<br>
-- <br>
View this message in context: <a moz-do-not-send="true"
href="http://drools-java-rules-engine.46999.n3.nabble.com/Possible-to-enforce-a-unique-salience-tp2120470p2120470.html">http://drools-java-rules-engine.46999.n3.nabble.com/Possible-to-enforce-a-unique-salience-tp2120470p2120470.html</a><br>
Sent from the Drools - User mailing list archive at <a
moz-do-not-send="true" href="http://Nabble.com">Nabble.com</a>.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></blockquote>
<br>
</body>
</html>