Calling a rule within a rule
by Dinesh kumar
Hi All,
I am new to Drools and I need a help.
Is it possible to call a rule within a rule.
i.e., only when rule1 condition is true , my rule2 should execute
rule1
when a!=null
then
...
rule2
when a.toString() !=""
then
...
Though i can write both the conditions in the same rule, its not a feasible
solution as my business rules are much complicated. I am expecting to write
something like this..
rule1
when a!=null
then
when a.toString() !=""
then
...
end
end
But this is not working out. It would be great if someone can help me out..
Also I understood that variables cannot be declared in guvnor.. Is this
true..? If true then what is an alternative. Kindly help me
Regards,
Dinesh
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Calling-a-rule-within...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 9 months
inline eval vs comparing booleans
by evertp
Hi
In the JBoss Rules 5.0 dev guide I read the statement:
When comparing inline eval with standard eval, we can see that they both
must
return true or false. However, inline eval must be a time-constant
expression.
It is evaluated only once and then it is cached by Drools
1. Can I assume that the caching lasts until the session is disposed of?
2. Is there a difference between the conditions Fact( eval(isValid) ) and
Fact( isValid == true ) or are they evaluated in the same way?
-Evert
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/inline-eval-vs-compar...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 9 months
Error on Rule Parsing on JBOSS server
by ramram
Hi All,
I have the below rule that I am testing when using a Tomcat server errors
the application deploys fine and the rule fires with no errors on the other
hand when I tried to deploy the same war on JBOSS I had the following
exception can anyone help on this.
Exception (
ERROR [STDERR] [1,9]: [ERR 101] Line 1:9 no viable alternative
at input '.'
java.lang.IllegalArgumentException: Could not parse
knowledge.
at
com.fp.engine.RuleEngineDef.newStatefulKnowledgeSession(RuleEngineDef.java:49)
at
com.fp.engine.RuleEngineDef.getSession(RuleEngineDef.java:29)
)
#created on: May 12, 2010
package com.fp
#list any import classes here.
import com.fp.vo.StageLine;
rule "test revenue rule"
when
stgLine : StageLine ( ruleName == 'testRev' )
then
System.out.println("++++ RULE HIT ON NETSALES ++++");
end
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Error-on-Rule-Parsing...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 9 months
Problem with poi.apache.usermodel.hssf file
by Fnu Mahalakshmi
Hi,
I tried downloading the apache poi 3.6 files from the apache site but I could not find any .jar files which I could add.
I got all java files for hssf and I added it to my eclipse project as external reference>add external class folder.
But still it is not recognized and I get error when I try to do this:
import org.apache.poi.hssf.usermodel.HSSFCell;
I do not understand what to download or add to make it work?
Can someone please help!!
Thank you in advance.
Mahalakshmi
</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>
15 years, 9 months
reading brl files in eclipse
by Fnu Mahalakshmi
Hi,
How can we read .brl files in eclipse (when I import a business rule to eclipse)?
How can I create a guided rule in eclipse? I am unable to use the facts in my project like it appears with the guvnor editor?
Please help ..
Thank you.
</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>
15 years, 9 months
Problem uploading project in eclipse
by Fnu Mahalakshmi
Hi,
I have created my rules and test scenarios as per the drools tutorial & guide.
But I am having trouble uploading that project into my Eclipse IDE.
I just selected upload from Guvnor Repository and I can then only select certain files.
Again the .brl files do not open in eclipse.
how I can test my sample dataset (contained in an excel file) in the drools guvnor itself without uploading the whole project in eclipse?
Or do I need to write all the rules from a scratch in eclipse again for it to work? Then whats the whole point of using the guvnor guided editor??
Please help me out. Am new to drools.
Thank you.
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.
15 years, 9 months
Problem uploading project in eclipse
by Fnu Mahalakshmi
Hi,
I have created my rules and test scenarios as per the drools tutorial & guide.
But I am having trouble uploading that project into my Eclipse IDE.
I just selected upload from Guvnor Repository and I can then only select certain files.
Again the .brl files do not open in eclipse.
how I can test my sample dataset (contained in an excel file) in the drools guvnor itself without uploading the whole project in eclipse?
Or do I need to write all the rules from a scratch in eclipse again for it to work? Then whats the whole point of using the guvnor guided editor??
Please help me out. Am new to drools.
Thank you.
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.
15 years, 9 months