3.1-M1 - Can't get rules to build
by Tom Gonzalez
I am attempting to convert our application to use drools 3.1.M from
current use of 3.0.4.
I downloaded the binaries posted and am getting this very basic
exception when building our rules.
[java] Feb 19, 2007 5:21:25 PM
com.nortel.connect.rbuilder.RulePackage addR
ulesFromDrlFile
[java] INFO: adding Rules from: CBMRules.drl (with associated
DSL)
[java] Exception in thread "main" java.lang.NoSuchFieldError:
recognizer
[java] at
org.drools.lang.DRLLexer$DFA18.<init>(DRLLexer.java:3914)
[java] at org.drools.lang.DRLLexer.<init>(DRLLexer.java:3565)
[java] at
org.drools.compiler.DrlParser.getParser(DrlParser.java:78)
[java] at
org.drools.compiler.DrlParser.parse(DrlParser.java:110)
[java] at
org.drools.compiler.DrlParser.parse(DrlParser.java:96)
[java] at
com.nortel.connect.rbuilder.RulePackage.addRulesFromDrlFile(R
ulePackage.java:219)
Any suggestions for getting past this?
Thanks,
Tom G
17 years, 6 months
Persistent store and web administration
by Schwenker, Stephen
Hello,
We have been using jboss rules for 6 months now and find it to be a good
tool overall. On the other hand we have noticed a few down sides.
Currently our rule engine runs on a jboss server and is deployed in a
sar. Every time we want to change the rules, we have to re-package and
re-deploy the app.
We want to advance our solution by providing a web application to
administer the rules. The first step of this will be to create a form
of persistent store for the rules. My first thought is to put it into a
database because we can then manage it easily with a web admin. Has
anyone done some work on this or can give me some ideas on how I should
start working on this? I'm willing to contribute some of my code to the
project if anyone is interested.
Thank you,
Steve.
17 years, 8 months
Persistent store and web administration
by Schwenker, Stephen
Hello,
We have been using jboss rules for 6 months now and find it to be a good
tool overall. On the other hand we have noticed a few down sides.
Currently our rule engine runs on a jboss server and is deployed in a
sar. Every time we want to change the rules, we have to re-package and
re-deploy the app.
We want to advance our solution by providing a web application to
administer the rules. The first step of this will be to create a form
of persistent store for the rules. My first thought is to put it into a
database because we can then manage it easily with a web admin. Has
anyone done some work on this or can give me some ideas on how I should
start working on this? I'm willing to contribute some of my code to the
project if anyone is interested.
Thank you,
Steve.
17 years, 8 months
globals
by fanory
Hello,
My problem is to use a global variable in some rules:
global PhysicalPerson assignee
rule "get_the_assignee"
no-loop
salience 100
when
exists PhysicalPerson()
beneficiary : PhysicalPerson()
eval(true)
then
assignee = new PhysicalPerson();
assignee.setId(new Long(007));
Tools2.traceSomething(assignee.getId());
Tools2.traceSomething("get_the_assignee");
end
rule "check_the_assignee"
no-loop
salience 50
when
exists PhysicalPerson()
eval(true)
then
Tools2.traceSomething("check_the_assignee");
Tools2.traceSomething(assignee.getId());
end
I don't understand why when my rule "check_the_assignee" is executed, i get a
null pointer exception on Tools2.traceSomething(assignee.getId()) ?
The question behind this is i want to use a created object inside a rule and use
it in others rules with lower salience ...
Thanks in advance.
17 years, 10 months
RuleFlow preview
by Mark Proctor
I thought everyone on the dev list would be interested in reviewing and
providing feedback on Kris' excellent work on RuleFlow - includes
screenshots :)
Mark
-------- Original Message --------
Date: Mon, 26 Feb 2007 01:51:29 +0100
From: Kris Verlaenen <kris.verlaenen(a)gmail.com>
Subject: Ruleflow
I've attached a document describing how ruleflow is implemented /
could be used in the future. If anyone has got any suggestions or
improvements (on the API I'm proposing, or things you would like to
see differently), just let me know asap.
I think I'll be able to commit a first working version on svn soon.
Still have to include conditional connections (where a connection is
only selected if its condition evaluates to true), and some smaller
stuff.
Kris
17 years, 10 months
Compiler API - changes?
by Michael Neale
Guys - are there going to be any changes to the compiler API now? Cause now
is the time to fix/change it if needed.
I have some suggestions if anyone is interested.
17 years, 10 months
Firing rules only if action causes updates to data?
by Premkumar Stephen
Hi Dev team,
Its been fascinating to watch the growth of this tool. Here is my question:
Rule x:
if
a = 5
b = 3
then
c = 0
Now, I have written this rule to run when a = 5 and b =3. But actually, I
would like it to ideally run when a = 5 and b = 3 and c != 0
Now, does the second scenario lead to any savings. In Ilog, the second
scenario will result in the rule NOT being added to the agenda whereas it
would in the first.
I cannot code the second scenario into the rule as the rule ( as seen in UI)
needs to match the requirements version ( in Doors) and they do not want to
add these to the requirements. I would just like to make the second version
for performance. We have noticed that less number of rules would fire.
Now, if a = 5, b = 3 and c = 0, is there a way Drools can look at it and
say, let me not fire this rule since there is no practical use anyways.
If not, what are the ways to automate not firing rules in scenarios where
action does NOT cause updates to data.
Thanks!!
17 years, 10 months
Parameters in DROOLS Queries?
by Phil DiBona
I would like to create a DROOLS Query that allows parameters to be
passed in from the Java side. This would allow me to easily filter
the query results without changing the query itself. Other rule
engines (e.g., JESS) can parameterize queries and this is a very
powerful feature.
But can DROOLS provide parameters to its queries? Or is there some
design "pattern" or rule-of-thumb I should use to filter query results?
Thanks,
Phil
17 years, 10 months
Drools 3.1.M1 Rules build java.lang.UnsupportedOperationException
by Tom Gonzalez
Getting exception below building rules that build in 3.0.4.
Looking at FunctionBuilder we have at line 106. The code in red looks
suspicious? Seems it should be mapping "mapping" against the name.
But that is not what is the cause of the exception apparently put is not
supported?
String name = pkg.getName() + "." + ucFirst(
functionDescr.getName() );
LineMappings mapping = new LineMappings( name );
mapping.setStartLine( functionDescr.getLine() );
mapping.setOffset( functionDescr.getOffset() );
lineMappings.put( name, lineMappings );
[java] INFO: ============== Start build RulePackage: [engrules.ers8600]
===
======
[java] Feb 21, 2007 2:38:28 PM
com.nortel.connect.rbuilder.RulePackage addR
ulesFromDrlFile
[java] INFO: adding Rules from: ERS8600Rules.drl (no
associated DSL)
[java] Feb 21, 2007 2:38:28 PM
com.nortel.connect.rbuilder.RulePackage addR
ulesFromDrlFile
[java] INFO: parsed rules no dsl
[java] java.lang.UnsupportedOperationException
[java] at java.util.AbstractMap.put(AbstractMap.java:228)
[java] at
org.drools.semantics.java.FunctionBuilder.build(FunctionBuild
er.java:110)
[java] at
org.drools.compiler.PackageBuilder.addFunction(PackageBuilder
.java:326)
[java] at
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.
java:214)
[java] at
com.nortel.connect.rbuilder.RulePackage.addRulesFromDrlFile(R
ulePackage.java:226)
[java] at
com.nortel.connect.rbuilder.RulePackager.build(RulePackager.j
ava:205)
[java] at
com.nortel.connect.rbuilder.RulePackager.buildAll(RulePackage
r.java:141)
[java] at
com.nortel.connect.rbuilder.RulePackager.main(RulePackager.ja
va:91)
Regards,
Tom G
17 years, 10 months
Shadow Facts don't require default no-arg constructor anymore
by Edson Tirelli
All,
As some of you trying out 3.1M1 already noticed, we were requiring
all classes of facts asserted into working memory to have a no-arg
default public constructor. This was because shadow facts are
implemented as lazy proxies internally in the engine, even not being
"accessible" from external world.
Today I inlined and integrated Objenesis
(http://objenesis.googlecode.com/svn/docs/index.html) into drools-core
as a way to avoid that. Objenesis team did a pretty good job in their
project and I can say I'm really happy with the results. Facts don't
need any special constructor anymore.
So far, all my tests passed and I found no problem. Although, I would
like to ask those of you trying out new drools version in different
environments (Application Servers, Security Managers, OSs and JVMs) to
checkout and try trunk code. Please let us know if you encounter any odd
exception.
Work was done under: http://jira.jboss.com/jira/browse/JBRULES-700
Thank you,
Edson
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3124-6000
Mobile: +55 11 9218-4151
JBoss, a division of Red Hat @ www.jboss.com
17 years, 10 months