Problems with OR
by skasab2s
Hello,
we are using Drools Expert. We have a rule which should fire if at least one
of the object attributes are not empty. This is my pattern:
( TblVersichKlinik(versicherung != null, versicherung != " ")
or
(TblVersichKlinik(zusatzversicherung !=null, zusatzversicherung != " ")) )
The problem is the following: when BOTH conditions are fulfilled, the rule
fires twice, so I get redundant results in my final result, and this is not
wanted.
Is there a way to solve the problem? Any ideas ?
Thanks a lot and many regards!
skasab2s
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Problems-with-OR-tp90...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
jBPM and Drools Flow
by Hitoshi Ozawa
Hi,
With changes in jBPM team and a new announcement on jBPM 5 being more
compatible with Drools Flow,
would appreciate if someone can tell me the current stance on Drools
Flow. Will the two join or remain
separate.
H.Ozawa
14 years, 5 months
Knowledge Builder Question
by Fnu Mahalakshmi
Hi guys,
In my program I have couple of .brl, .drl and .dslr files which get added to the rulebase.
Now my .brl files get converted to drl files and then have to be added to the rulebase.
After creating my .drl or .dslr file I am using this code to update the resources in my change-set.xml
ResourceChangeScannerConfiguration sconf = ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
sconf.setProperty( "drools.resource.scanner.interval",
"30" ); // set the disk scanning interval to 30s, default is 60s
ResourceFactory.getResourceChangeScannerService().configure( sconf );
ResourceFactory.getResourceChangeNotifierService().start();
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newClassPathResource( "change-set.xml", getClass()),ResourceType.CHANGE_SET );
if ( kbuilder.hasErrors() ) {
System.err.println( kbuilder.getErrors().toString() );
}
Now as per my understanding:
Since a new .drl file has been just created - the resource notifier will update my change-set.xml file of the change.
Now I need to load this new file to my rulebase along with my dsl file.
kbuilder.add( ResourceFactory.newClassPathResource( "change-set.xml", getClass()),ResourceType.CHANGE_SET );
is adding my new created file to my knowledge pacakage.
How can I specify my dsl file also to be added along with it???
I also keep getting the following error when I run the program:
Exception in thread "main" java.lang.NoSuchMethodError: org.drools.compiler.PackageBuilder.addKnowledgeResource(Lorg/drools/io/Resource;Lorg/drools/builder/ResourceType;Lorg/drools/builder/ResourceConfiguration;)V
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:30)
at com.org.RuleRunner.loadRules(RuleRunner.java:75)
at com.org.RuleRunner.runStatelessRules(RuleRunner.java:155)
at com.org.RulesTest.main(RulesTest.java:40)
Is my drools-compiler.jar not having the correct information required???? How can I change that??
Can you please guide me in the right direction..??
Please help.
Thank you.
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
14 years, 5 months
Re: [rules-users] creating and integrating a specific output using drools
by Fnu Mahalakshmi
Hi,
For using queries against the working memory : we do again need a knowledge of which query to fire against the working memory depending on which rule is fired. Also maintain a list of different queries which is ultimately written out to our output file.
Is there any way to determine this in our rule itself??
I could set a variable stating which query to be fired. But again I will be maintaining a lot of global variables then.
Any idea?? Any better solution???
Thanks
M
----------------------------------------------------------------------
Message: 2
Date: Fri, 18 Jun 2010 15:12:28 +0100
From: "Swindells, Thomas" <TSwindells(a)nds.com>
Subject: Re: [rules-users] creating and integrating a specific output
using drools
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<DAC86F5F3B84F14088F0DB16092558CA090238F5E7(a)UKMA1.UK.NDS.COM>
Content-Type: text/plain; charset="us-ascii"
Rather maintaining global lists have you looked into using queries against the working memory to get out what you need?
Thomas
Please consider the environment before printing this email.
Visit our website at http://www.nyse.com
****************************************************
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
14 years, 5 months
Re: [rules-users] creating and integrating a specific output using drools
by Fnu Mahalakshmi
Hi,
No. I did not look into that. Thanks for the info.
Do you know of any documentation I could refer for the same??
Thank you.
M
Today's Topics:
1. creating and integrating a specific output using drools
(Fnu Mahalakshmi)
2. Re: creating and integrating a specific output using drools
(Swindells, Thomas)
3. Problems with OR (skasab2s)
4. Re: Problems with OR (David Sinclair)
5. Re: Problems with OR (Giovanni Motta)
----------------------------------------------------------------------
Message: 2
Date: Fri, 18 Jun 2010 15:12:28 +0100
From: "Swindells, Thomas" <TSwindells(a)nds.com>
Subject: Re: [rules-users] creating and integrating a specific output
using drools
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID:
<DAC86F5F3B84F14088F0DB16092558CA090238F5E7(a)UKMA1.UK.NDS.COM>
Content-Type: text/plain; charset="us-ascii"
Rather maintaining global lists have you looked into using queries against the working memory to get out what you need?
Thomas
Please consider the environment before printing this email.
Visit our website at http://www.nyse.com
****************************************************
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
14 years, 5 months
creating and integrating a specific output using drools
by Fnu Mahalakshmi
Hi,
I have my basic drools application up and running.
Now I have a very disconnected input file (i.e all data is very diff from each other)
As of now I am loading all the output data in a globallist and writing it to an output file.
Now all the global lists are separate for different data inputs that I provide.
Is there a more efficient way to do this rather than maintaining many global lists ???
Thank you.
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
14 years, 5 months