Rule Organization suggestions
by Michael Rhoden
We currently are using an older version of drools, 2.x maybe at the
moment and have a few thousand rules that load through xml files. I have
loaded all my old rules in the latest JBoss Rules version, but we have
to eval() on most everything. It worked fine but this is not the path we
want to continue for new rules repositories. We currently have a
homebrew brms that handles the generation of "RuleIDs". Given the xml
standard has changed dramatically and it appears we would be better
served writing new contextual rules in DRLs, does anyone have a
suggestion as to manage large amounts of rules? The main 2 things I need
are:
1) A way to write rules that will give me unique IDs for each rule. The
main need for this is to "Override" a rule. In our business (as in many)
we have the need for rules to control business logic, IE "amount > 100"
then "stop transaction". What we use today is a rules override system
where certain business users can put in the rule Id and the transaction
number and the rule that fires will be ignored moving forward. Just
looking for a stop gap measure to auto generate rule ids, I guess I'm
hoping I've overlooked a DRL plugin ;) Potentially I was wondering if
the DRL Rule has an attribute to put a ruleID and once a consequence
fired I could look up the ID.
2) We want to use the new jbrms when it's released, but wondered what
the most appropriate format for new rules would be. Meaning if I create
DRL rules will I be able to import them in the new system? Will it
create Rules IDs for these rules then?
Thanks for the help.
-Michael Rhoden
17 years, 8 months
Question on HonestPolitician Example
by Joe Kutner
Hello,
I have a question regarding the execution of the HonestPolitician example.
Why does the "Hope is Dead" rule get fired? I understand that an activation
for that rule will be included in the agenda during the first pass (i.e.
when no Hope object exists in working memory). But shouldn't that
activation be removed once the "We have an honest Politician" rule is fired
(and thus a Hope object is asserted to working memory)?
The output I get when running the example is:
Hurrah!!! Democracy Lives
I'm an evil corporation and I have corrupted schroder
I'm an evil corporation and I have corrupted chirac
I'm an evil corporation and I have corrupted bush
I'm an evil corporation and I have corrupted blair
We are all Doomed!!! Democracy is Dead
Maybe this question is more directed rule-engines in general. Should all
rule-engines have the same output when given the exact same rule-set? Or is
there a subjectivity to how a particular rule-engine processes the agenda?
Thank you,
J
17 years, 8 months
Request user feedback during rules execution
by kchantzara@costamare.com
Hello,
I am thinking about using JBoss Rules as the mid-tier of a web application.The aim of this system is to conclude on some results based on the rules and on some data provided by the user by the web interface. The problem is that apart from the initial input, some more user information might be needed during the rules workflow. The user response might result in asserting new objects into the working memory, firing new rules etc. My question is, would it be possible to request user information as part of the RHS of a rule and 'halt' the firing of rules until this information is provided?
Thanks in advance,
Katerina
17 years, 8 months
trouble with 3.1.0-M1 docs?
by Justine Hlista
I am having trouble reading the 3.1.0-M1 docs/html files in either internet
explorer or firefox.
All I see under the chapter headings are a bunch of empty <xi:include>
elements.
Is there a plug in needed? Any ideas?
Thanks,
Justine
17 years, 8 months
Problem with shadow facts in trunk
by Dirk Bergstrom
I'm using trunk (revision 10170), and I'm getting an error while asserting
objects. It looks to be reproducible, in that it only happens with particular
instances of one class. But since it's in a method of a generated class (the
shadow proxy), I don't have a clue how to debug it. I had a look at the
buildHashCode method in ShadowProxyFactory, but the magic was too thick for me.
If it helps, the class being shadowed has boolean, float and long attributes,
but no char, short, int, double or list.
Here's the stacktrace:
Exception in thread "RLIs Processor" java.lang.IncompatibleClassChangeError
at net.juniper.dash.data.RLIRecordShadowProxy.hashCode(Unknown Source)
at java.util.HashMap.put(HashMap.java:418)
at java.util.HashSet.add(HashSet.java:194)
at org.drools.reteoo.CollectNode.assertTuple(CollectNode.java:135)
at org.drools.reteoo.CollectNode.assertObject(CollectNode.java:212)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:304)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:176)
at org.drools.reteoo.Rete.assertObject(Rete.java:121)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
at
org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:68)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:729)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:548)
--
Dirk Bergstrom dirk(a)juniper.net
_____________________________________________
Juniper Networks Inc., Computer Geek
Tel: 408.745.3182 Fax: 408.745.8905
17 years, 8 months
Problems with rule builder errors
by Dirk Bergstrom
I'm using trunk (revision 10170), and I'm getting an exception when trying to
read errors after calling PackageBuilder.addPackageFromDrl(String, Reader). The
getErrors() method spits out this exception:
java.lang.ArrayStoreException
at java.lang.System.arraycopy(Native Method)
at java.util.ArrayList.toArray(ArrayList.java:304)
at org.drools.compiler.PackageBuilder.getErrors(PackageBuilder.java:380)
(The docs for toArray say that exception is thrown if one of the members of the
List is the wrong class for the supplied array.)
If I instead call printErrors, I get something more useful:
java.lang.ClassCastException: org.drools.lang.ExpanderException
at org.drools.compiler.PackageBuilder.printErrors(PackageBuilder.java:390)
It looks like someone is putting the wrong kind of exception in the error list.
This may be related to some bugs in DSL handling. I had to comment out all the
blank lines in my DSL file to get it to suppress some other errors, and if I
switch to PackageBuilder.addPackageFromDrl(String), the problem goes away.
--
Dirk Bergstrom dirk(a)juniper.net
_____________________________________________
Juniper Networks Inc., Computer Geek
Tel: 408.745.3182 Fax: 408.745.8905
17 years, 8 months
Executing few specified rules !!!
by Prashant Punekar
Hi ,
I have recently started using Drools. Have got stuck at one point. didnt find much help on it.
Suppose I have 10 diff rules in the drl file and I want to fire only 3 rules out of all.
Is this possible ? if yes, please do lemme know how should I go about it?
Regards,
Prashant
The information contained in, or attached to, this e-mail, contains confidential information and is intended solely for the use of the individual or entity to whom they are addressed and is subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
www.aztecsoft.com
17 years, 8 months
Quick post on writing rules
by Edson Tirelli
All,
I made a short post on how to write rules and how to detect possible
problems with it. It is really short and a bit highlevel (abstract), but
the subject is open and very extensive.
http://markproctor.blogspot.com/
I'm thinking in eventually following up with real examples/use cases,
showing how to implement rules using known patterns
(http://wiki.jboss.org/wiki/Wiki.jsp?page=UsagePatterns). So, if you
have a case you would like us (I will get other people involved as
needed) to analyze and provide some suggestions and you think that
others would benefit from your case, feel free to send me a description
of the use case and the business rules involved. I will try to make a
didactic example of it and post.
Plz send me in PVT so to not flood the list.
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, 8 months
Antlr problem in websphere
by Nirmal.R
Hi all,
I've configured hundreds of rules and also i've also built a GUI for
configuring rules. The development server was Tomcat. Rules got executed
successfullly but now we are trying to deploy it in websphere it throws an
antlr problem and we are not able execute the rules.
I'm in a critical situation to an extend that the project will be dropped.
So somebody give me an immediate solution.
Thanks
Nirmal
--
View this message in context: http://www.nabble.com/Antlr-problem-in-websphere-tf3401516.html#a9472421
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 8 months
Rules Behavior
by Patrick Santana
Hello Guys,
I have a .dsl file that contains this:
[then]Task FORWARD {fwd}=task.put("FORWARD","{fwd}");
In my rule file I have:
Task FORWARD Joseph Peter,jpeter,approve
obs.: task is a hash.
After the rule run correct, I got this result inside the hash task.
"Joseph Peter , jpeter , approve". I mean, some spaces were added.
Does anybody know why I have this behavior?
Thank you all,
____________________
Patrick Santana
patrick(a)digitalbio.be
___________________________________________________________
Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
17 years, 8 months