using property files in knowlegde base
by Kilian Reisenegger
Hi all!
First of all I have to say that I'm quite new to Drools, so please be
patient with me =)
My question regards the property files which can be assigned to a
package in the knowledge base. I'd like to store property files for
internationalization in the knowledge base and work with them in my
process definition. So far I added the needed files via the guvnor to my
package but how I'm supposed to load them in the process definition? I
already had a look at the documentations and api-javadoc but couldn't
find anything to answer my question.
Thanks in advance for your help.
Kilian
15 years, 8 months
Drools Flow Loop
by skasab2s
Hello,
we want to use in our company a ruleflow with a loop. The loop should be
executed every 5 minutes and should be exited on some conditions based on
the facts (for example Fact1 ( value > 50)). This is our resulting ruleflow
(see attached image).
http://n3.nabble.com/file/n833857/ValidationBloodPoisoning.png
The problem is the following:
When the ruleflow goes from the Split-Node to the clearWorkingMemory-Node,
everything works fine, but after going from split to join (i.e. the loop
begins), nothing is executed anymore, although we expected that after the
Join-Node the Node-Group "Detect Blood Poisoning" should be executed. My
Join-Node is from type XOR.
Do you have any ideas why the loop is not executed ? Should we allow loops
explicitly ? I've searched this forum about this but I don't came to
solution.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Loop-tp83...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 8 months
using property files in knowlegde base
by Kilian Reisenegger
Hi all!
First of all I have to say that I'm quite new to Drools, so please be
patient with me =)
My question regards the property files which can be assigned to a
package in the knowledge base. I'd like to store property files for
internationalization in the knowledge base and work with them in my
process definition. So far I added the needed files via the guvnor to my
package but how I'm supposed to load them in the process definition? I
already had a look at the documentations and api-javadoc but couldn't
find anything to answer my question.
Thanks in advance for your help.
Kilian
15 years, 8 months
use rule assign actor
by HONG DENG
hi , i am a drools flow newbie.I want to using "assignment rule"
assign a actor to a HumanTask. I have write a dsl and dslr files and
following code :
kbuilder.add(ResourceFactory.newClassPathResource("HelloWorldSample.rf"),
ResourceType.DRF);
kbuilder.add(ResourceFactory.newClassPathResource("assignment.dsl"),
ResourceType.DSL);
kbuilder.add(ResourceFactory.newClassPathResource("assignment.dslr"),
ResourceType.DSLR);
but when i start a process instance and the token arrive at a
humantask,the "assignment rule" couldn't be firing.
who can tell me how can i do it?
15 years, 8 months
Changes made to knowledge bases and the time associated with it
by Luiz Eduardo Guida Valmont
Hi all,
I'm working on an application that has to maintain a knowledge base that'll
change (a lot) over time; meaning some rules might change, others will be
added and, finally, some will be deleted from the KB. Our tests show the
following un-expected (imho *) behaviors:
- Whenever the contents of the KB change, all rules associated with it
are re-compiled.It doesn't matter whether one rule or all of them were
changed.
- If the time taken to re-compile all rules is greater than the frequency
according to which resource change notification / scanner services poll the
KB, then the KB will be re-compiled more than once. I can't measure how many
extra compilations happen due to time constraints; it takes more than 10
minutes for the application to compile all rules and something like 5
minutes to recompile the smallest possible version of it.
So... my question is: is possible to fine tune this behavior so that drools
won't recompile everything from scratch? More than that, I'd like to have it
wait for itself to finish any compilation that might happening at the time.
Is it possible?
My approach to using drools is the following: create a KnowledgeAgent, then
have it apply a change set that points to a directory that contains DRL
files. And this has to be done for five different KA's. I suppose this is
the correct approach.
Thanks in advance for any feedback that you might have.
Regards,
Luiz Eduardo
15 years, 8 months
Re: [rules-users] Drools with Guvnor
by Michael Rhoden
Yes and no . Guvnor uses a JCR repository (the default is http://jackrabbit.apache.org/) which can not be accessed using hibernate directly. We ran into this issue, and the only way to use guvnor as of 6 months ago was to have a user go into guvnor and create a DRL file by clicking a few buttons. Not a big deal, but it isn't automated. You can then use that DRL as a resource in your application. I know there was some working being done to be able to pull out DRLs from Guvnor using xml calls, but don't know if that was ever completed.
Michael Rhoden
----- Original Message -----
From: "bbarani" <bbarani(a)gmail.com>
To: rules-users(a)lists.jboss.org
Sent: Wednesday, May 19, 2010 5:12:57 PM
Subject: [rules-users] Drools with Guvnor
Hi,
I am very new to Drools and very very new to Guvnor.
I am in the process of creating a rule engine which will fetch the data from
a source (I am using Hibernate framework to fetch the data) and evaluate the
data using Drools rule engine. The rules supplied to the Drools rule engine
are stored in a Rules table in a database.
Now my question is that can I use Guvnor to store the rules (instead of me
creating a rule data model) and use Guvnor to supply rules to my Drools
engine?
I am trying to find out the best possible way to create / manage a rule
database (which stores all the rules).
Thanks,
BB
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-with-Guvnor-tp...
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 8 months
ANT Compile issues
by Bhamidi, Krishna
Hi,
I am using DROOLs 5.0.0 CR1 and use the compiler from Drools-Ant. When I attempt to execute the rules using a rule agent, I get an exception that in part reads
java.lang.NullPointerException
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1820)
(Full stack follows this e-mail.) However, when I download the pkg file for the same ruleset from Guvnor and use it in the rule agent, it runs fine.
I use the following for building -
<taskdef name="compiler" classname="org.drools.contrib.DroolsCompilerAntTask" classpathref="compiler.classpath" />
<compiler srcdir="../${rulesDirectory}" tofile="../${buildDirectory}/${projectName}_rules.pkg"
classpath="../${buildDirectory}/${projectName}_rules.jar"
binformat="package">
<include name="*.drl" />
<include name="*.brl" />
<include name="*.xml" />
<include name="*.dslr" />
<include name="*.xls" />
</compiler>
What I should do to compile correctly?
Full Stack
java.lang.NullPointerException
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1820)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.drools.rule.DialectRuntimeRegistry.readExternal(DialectRuntimeRegistry.java:41)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.drools.rule.Package.readExternal(Package.java:197)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1755)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1717)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
at org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:189)
at org.drools.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:158)
at org.drools.agent.FileScanner.readPackage(FileScanner.java:136)
at org.drools.agent.FileScanner.getChangeSet(FileScanner.java:82)
at org.drools.agent.FileScanner.loadPackageChanges(FileScanner.java:56)
at org.drools.agent.DirectoryScanner.loadPackageChanges(DirectoryScanner.java:69)
at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:410)
at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:362)
at org.drools.agent.RuleAgent.configure(RuleAgent.java:347)
at org.drools.agent.RuleAgent.init(RuleAgent.java:247)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147)
15 years, 8 months
Drools with Guvnor
by bbarani
Hi,
I am very new to Drools and very very new to Guvnor.
I am in the process of creating a rule engine which will fetch the data from
a source (I am using Hibernate framework to fetch the data) and evaluate the
data using Drools rule engine. The rules supplied to the Drools rule engine
are stored in a Rules table in a database.
Now my question is that can I use Guvnor to store the rules (instead of me
creating a rule data model) and use Guvnor to supply rules to my Drools
engine?
I am trying to find out the best possible way to create / manage a rule
database (which stores all the rules).
Thanks,
BB
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-with-Guvnor-tp...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 8 months