Re: [rules-users] How to pass variables to a drools rule file?
by FrankVhh
It is looking for com.sample.Qos. Try to add the import statement
test.java.Qos somewhere on top of your file.
Regards,
Frank
penny wrote
> Hi,there.I have a class in test.java file.It looks like:
> class Qos{
> boolean S;
> boolean W;
> Qos(){
> S = true;
> W = false;
> }
> public boolean getS(){
> return S;
> }
> public boolean getW(){
> return W;
> }
> }
>
> Now I want to use the Qos class in my rule file like this:
> rule "rule1"
> ruleflow-group "myRules"
> salience 4
> when
> //conditions
> $qos:Qos(S==true && W==true);
> then
> System.out.println("rule1");
> end
>
> But here is an error.
> [Error: could not access field: com.sample.Qos.S]
> [Near : {... S == true ....}]
> ^
> [Line: 1, Column: 1]
>
> How can I do?
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-pass-variables-to-a-drools-rule-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
Runtime Exception null accessor
by Bojan Janisch
Hello Guys,
I've thought many hours about this problem, but don't know how to fix it. I've also searched the web, getting only some unfinished problems. Maybe someone here knows how to solve it:
Each time I'm running JDrools through my textfiles (I'm using it in textmining concepts), I get the same runtime exception:
25.02.2013 18:03:59 org.apache.uima.collection.impl.cpm.engine.CPMThreadGroup process
SCHWERWIEGEND: The CPM thread group caught the following unhandled error: java.lang.RuntimeException (Thread Name: Thread-5)
25.02.2013 18:03:59 de.fraunhofer.scai.bio.uima.core.deploy.StatusCallbackListenerImpl entityProcessComplete(151)
SCHWERWIEGEND: Exception occurred
java.lang.RuntimeException: Null accessor on node: a1_begin
at de.fraunhofer.scai.bio.uima.core.deploy.StatusCallbackListenerImpl.entityProcessComplete(StatusCallbackListenerImpl.java:151)
at org.apache.uima.collection.impl.cpm.engine.CPMThreadGroup.notifyListener(CPMThreadGroup.java:103)
at org.apache.uima.collection.impl.cpm.engine.CPMThreadGroup.uncaughtException(CPMThreadGroup.java:86)
at java.lang.Thread.dispatchUncaughtException(Thread.java:1888)
For me it looks like an unhandeld race condition (but I'm not quite sure). Does someone have had this or a similar problem regarding null accessors at runtime?
Thanks for your help.
Bojan
12 years, 10 months
Rule IDE
by starfish15
Hello all,
Just want a confirmation of something quite miniscule. Though my teacher at
a very young age had tole me that "No Q can ever be a DUMB Q" ;)
The last time i had checked and had definitely known, that ECLIPSE was the
only IDE which had the RULE IDE plugin. Recently, someone challenged me on
this query and i was a bit flustered.
Hence kindly assist on this query.
Regards,
starfish
--
View this message in context: http://drools.46999.n3.nabble.com/Rule-IDE-tp4022564.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
DB2 and Guvnor
by IPatel
Hi All,
I am trying to configure Guvnor so that it can connect to DB2. I came across
a document online that shows the steps to do this..however i cannot find
that document anymore.
Does anyone have the link/reference/steps on how to do this??
Thank you
--
View this message in context: http://drools.46999.n3.nabble.com/DB2-and-Guvnor-tp4022522.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months
Compiled rules differ KnowledgeAgent vs ResourceChangeScanner
by lhorton
Version 5.2.0.Final. I have a DRL file that is loaded into my server using a
change set and Spring configuration. The file loads without error, and I am
able to read the compiled package and print the rule names to confirm they
did load; however, only one of the rules fires. Then I copy (hot-deploy)
the same DRL file to its server-side directory, and the Resource change
Scanner picks it up and reloads it. After reload, all the expected rules
execute.
My guess is that the Spring/KnowledgeAgent compilation is different than the
one done via the resource change scanner. Has anyone else seen this
behavior? Any suggestions for further trouble shooting?
I can attach the change set, spring config and drl file if needed.
--
View this message in context: http://drools.46999.n3.nabble.com/Compiled-rules-differ-KnowledgeAgent-vs...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 10 months