JUnit testing
by J Michael Dean
In examining the examples that are provided as an Eclipse project,
there are none that simply do JUnit testing of simple rules examples.
The insurance example is a BRMS example, and has unit tests, but none
of the other examples actually has a unit test.
I am having problems figuring out how to do JUnit 4 unit tests with
Drools and am wondering what I am missing.
Thanks.
- Mike
17 years
RE: not able to deploy in linux
by Sikkandar Nawabjan
when i deployed and run the rule in linux machine am getting the following error. why is that? The same rule is working fine with windows
sun.io.MalformedInputException
at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java(Compiled Code))
at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java(Compiled Code))
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java(Compiled Code))
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java(Compiled Code))
at java.io.InputStreamReader.read(InputStreamReader.java(Compiled Code))
at java.io.Reader.read(Reader.java(Compiled Code))
at org.drools.compiler.DrlParser.getDRLText(DrlParser.java:150)
at org.drools.compiler.DrlParser.parse(DrlParser.java:83)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:196)
17 years
Deploying from the IDE, How to Build a ".pkg" from the IDE plug-in
by mmquelo massi
Hi guys,
Accordingly to the Drools User's Guide, We can use the drools-ant module in
order to generate a folder with all our rules.
How to generate a ".pkg" file from that folder?
Where can I find a tutorial about compiling drools rules with ant? (I am an
"ant-newbie"...:- ) )
Once I realize how to do it, It would be a pleasure to me developing a
plug-in
extension which simply right-clicking on the "rule folder" generates a
binary ".pkg" file. Then I could try to add an "hot Deployment" function
in order to "Hot deploy" the bin file into JBoss....Just like we are used to
see in the BRMS snapshot....
Bye bye.
Massi
17 years
error inserting object into working memoery
by Eric Miles
Why am I getting this error when attempting to insert an object into
working memory (stateful session)
java.lang.NullPointerException
at
org.drools.common.DefaultFactHandle.<init>(DefaultFactHandle.java:73)
at
org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:34)
at
org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:57)
at
org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:48)
at org.drools.reteoo.FromNode.assertTuple(FromNode.java:86)
at
org.drools.reteoo.CompositeTupleSinkAdapter.createAndPropagateAssertTuple(CompositeTupleSinkAdapter.java:73)
at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:317)
at
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
at org.drools.reteoo.Rete.assertObject(Rete.java:177)
at
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:858)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659)
at
com.kronos.webta.service.smarttime.rules.maxiflex.FlowTest.test2(FlowTest.java:168)
17 years
Rules execution (get information about end of execution)
by Carlos Vieira
Hi,
I need to know at a given time, if a WorkingMemory is executing one or
more rules.
The goal is to ask to rules engine if it is processing something or not....
Anyone tried this before? Drools don't seem to have direct support for
this. I tried an approach using Activations, but it is not possible
since they can be zero sized, and can be finishing executing something.
Any ideas?
Thanks in advance
Carlos Vieira
17 years
class ont found error using BRMS
by Rahul Upadhyay
Hi
I am new in drools.
Whenever I import a .drl file to make a package in BRMS,then make model to
load a class then upload it.
After that I try to save and validate configuration.. I find error.. class
not found.
Why does model upload only jar file instead of class file ?
how to do this..
I think i am donig some worng to import.
Whats wrong... ??
Plz Help
Thanks in adavance
Rahul Upadhyay
17 years
Drools and BRMS (60,000+ rules)
by Carlsen, Len
Hello,
I am wondering if anyone has any experience in managing very large rule
sets and facts and could share their experiences in the design and
management of this.
We are embarking on a new Student Information System project here at UBC
in conjunction with several other American universities. We have pretty
much decided to use Drools as our rules engine and maybe also the Drools
BRMS for our business rules management. Our first application is the
course curriculum application/module where we will manage course
co-requisites, pre-requisites, etc. and we estimate that we will have
about 20,000 course rules. We currently have about 15,000 course rules
(QuickRules) in production now. We will also have security rules,
input/form validation rules, student awards rules, degree rules,
enrolment rules, admission rules, student financial rules etc. which
will total about 40,000 rules. So currently we are looking at managing
about 60,000 rules (not including versioning). If we include versioning
then there would probably be more than 100,000 rules.
Example:
A single course could have 10 or more rules per course version. We
currently have about 2000 course and most courses have more than 1
version.
We are looking into developing our own rules management system to define
dependencies between rules, courses (facts) and course + rule versions.
E.g. Course CHEM101 version 1 links to CHEM101 a single rule or a rule
set/package version 1 by a rule id.
We need the ability to notify users when rules are modified which
impacts other rules and what impact changing a rule can cause for
example a degree program. E.g. changing a course's pre-requisite may
affect other courses' pre-requisites; rules about rules. We also need
the ability to find out why a student was not able to register for a
course etc. We will also need to show the course dependency graph
visually (the RDBMS can probably help us here). Later, we are hoping to
use the Drools Solver for course and exam scheduling and also to use it
for student degree planning and student awards.
We will need to translate the rules into English language syntax for
publication in the course calendar and later into other languages (first
French) since the SIS application will be used internationally. Listing
requirements could just be shown in bulleted form. Probably can't use
the DSL in this case since we would need to support several languages or
maybe I am wrong here?
If we use the Drools BRMS to store all of our rules on a relational
database, will we be able to write SQL queries to get at specific
rules/packages to link facts (courses) to rules? Or do we have to go
through the BRMS to get at the rules. Does BRMS have a facility to
validate rules against facts so you can see if your rules execute
correctly against your data/facts before committing your rules. Or maybe
we need a testing framework for this.
Other issues are the performance of the Drools Solver and having
thousands of rules compiled, loaded and running. During registration we
could have thousands of rules executing concurrently. The rules engine
and the BRMS would be services as part of an SOA infrastructure (and an
OSGi service environment). Anyone got any experience with Drools in an
OSGi environment with respect to class loading issues when compiling
rules and facts from other bundles since rules and facts may be in
different bundles? Bundle buddy class loading?
Later, we will need translators to/from other rule engines; maybe ruleML
and JCR can help us here.
So far, I think Drools can do most of this; am I correct here? Does any
of this sound plausible?
Thanks very much for any tips, thoughts or comments.
Len
Len Carlsen
Enrolment Services - Student Systems
University of British Columbia
17 years
odd error when trying to update a fact in working memory
by Eric Miles
Can anyone tell me what this means? It seems as though the fact is
being updated elsewhere and is causing the fact handle to not be found,
but I have no idea how to go about figuring that out. Is this even what
this error message is trying to tell me?
java.lang.NullPointerException
org.drools.util.AbstractHashTable$EqualityEquals.hashCodeOf(AbstractHashTable.java:325)
org.drools.util.ObjectHashMap.remove(ObjectHashMap.java:96)
org.drools.reteoo.FromNode.retractTuple(FromNode.java:110)
org.drools.reteoo.CompositeTupleSinkAdapter.createAndPropagateRetractTuple(CompositeTupleSinkAdapter.java:83)
org.drools.reteoo.LeftInputAdapterNode.retractObject(LeftInputAdapterNode.java:151)
org.drools.reteoo.CompositeObjectSinkAdapter.propagateRetractObject(CompositeObjectSinkAdapter.java:375)
org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:180)
org.drools.reteoo.Rete.retractObject(Rete.java:214)
org.drools.reteoo.ReteooRuleBase.retractObject(ReteooRuleBase.java:211)
org.drools.reteoo.ReteooWorkingMemory.doRetract(ReteooWorkingMemory.java:79)
org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1231)
org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:96)
com.kronos.webta.service.smarttime.rules.Rule_Schedule_Day_0.consequence(Rule_Schedule_Day_0.java:20)
com.kronos.webta.service.smarttime.rules.Rule_Schedule_Day_0ConsequenceInvoker.evaluate(Rule_Schedule_Day_0ConsequenceInvoker.java:22)
17 years
how to build package in BRMS
by Rahul Upadhyay
Hi
I am new in drools.
Whenever I import a .drl file to make a package, then make model to load a
class then upload it.
After that I try to save and validate configuration.. I find error.. class
not found.
Whats wrong... ??
Plz Help
Thanks in adavance
Rahul Upadhyay
17 years
RE: rules-users Digest, Vol 12, Issue 79
by prateek.katiyar@wipro.com
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
17 years