problems using rule flow
by hypnosat7
When I use my rule flow with only one asserted fact it work very well, but
when I assert more than one fact it goes wrong. I used the Audit View to fix
the problem.
My rule flow : Start -> ruleFlowGroup1 -> split -> ruleFlowGroup2 ....
-> join ....
When I edit my split node I have this :
To node ruleFlowGroup2 : constraint
To node join : constraint
For the node join constraint I specified something like :
myFact(state==myFact.state1)
And when a fact with state==myFact.state1 is inserted the split node
constraint are true for the others facts even if their states are different
from myFact.state.
I'm also updating my fact in all the rules.
So my question is, how can I say to the split node to consider the fact
outgoing from the ruleFlowGroup1 and not a fact in the working memory ????
Thanks
Any help pls ?
--
View this message in context: http://www.nabble.com/problems-using-rule-flow-tf4128169.html#a11739566
Sent from the drools - user mailing list archive at Nabble.com.
18 years, 5 months
Problem with function
by Natraj Gudla
With 4.0.0 i am getting the run time exception on functions. what could be
the problem
*Exception*
**
*
java.lang.NullPointerException
*
at org.drools.base.ClassTypeResolver.resolveType(*ClassTypeResolver.java:127
*)
at org.drools.rule.builder.dialect.java.JavaFunctionBuilder.build(*
JavaFunctionBuilder.java:72*)
at org.drools.rule.builder.dialect.java.JavaDialect.addFunction(*
JavaDialect.java:434*)
at org.drools.compiler.PackageBuilder.addFunction(*PackageBuilder.java:350*)
at org.drools.compiler.PackageBuilder.addPackage(*PackageBuilder.java:259*)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(*PackageBuilder.java
:147*)
at com.drools.sample.ParseDRL.readRuleFromDrl(*ParseDRL.java:86*)
at com.drools.sample.ParseDRL.main(*ParseDRL.java:25*)
Exception in thread "main"
*My Function:*
*
function* *double* getROI(loanAmount){
*double* roI=0.0;*
**if*( loanAmount <= 499000 )
roI = 18;*
**else* *if*( loanAmount <= 999000 )*
*roI = 17;*
**else* *if*( loanAmount <= 1990000 )*
*roI = 14.5;*
**else* *if*( loanAmount <= 3990000 )*
*roI = 12;*
**else* *if*( loanAmount <= 7490000 )*
*roI = 11.5;*
**else* *if*( loanAmount > 7490000 )*
*roI = 9.99;*
**return* roI;
}
Thanks
Natraj Gudla
18 years, 5 months
rete view colours appear diffirent to documentation
by Aakil Omar
I was busy trying to draw a rete view according to what I was understanding
from the documentation, but thought it prudent to create the rule in the ide
and then look at the rete view there before assuming that I am correct. I
had a bit of shock at first as it did not look at all as I expected. After a
few deep breaths realized that the colors are probably just different. I
need confirmation if I am reading it correctly please.
Jboss Rules Documentation:
Rete Nodes
In the Eclipse IDE Rete view
It looks like the ObjectTypeNodes are Red not blue and
AlphaNodes are blue not red and the rest is the same as the documentation.
Can someone please confirm this for me before I get it all wrong.
Thanks
Aakil
18 years, 5 months
Trouble with BRMS on newly released 4.0
by Wagner Rick - rwagne
Hi all,
Thanks for all the hard work going into 4.0.
Could you please help me diagnose a problem I'm having with the BRMS?
I've installed it on Tomcat 6 and JBossWS1.0.1, but under both when I
try to access localhost/drools-jbrms I get only a banner header and a
new URL:
http://localhost:8080/drools-jbrms/org.drools.brms.JBRMS/JBRMS.html
The log shows nothing out of the ordinary...
Thanks,
Rick
***************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.
If the reader of this message is not 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 resend this
communication to the sender and delete the original message or any copy
of it from your computer system.
Thank You.
****************************************************************************
18 years, 5 months
Partial "not"?
by Yuri de Wit
I have a case where I need to negate only part of the predicates.
RULE1
when:
c1 : Child()
c2 : Child(hashCode < c1.hashCode, prop1==c1.prop1, ... propN==c1.propN)
then:
insert(new Parent(c1, c2));
RULE2
when
p:Parent()
c1:Child(this memberOf p)
not Child(this memberOd p, prop1==c1.prop1, ...propN==c1.propN)
then
retract(p);
While in rule1 I use a matching criteria to group c1 and c2, in rule2
I want to use the inverse of the same exact criteria to ungroup them.
I dont care which propN no longer holds, as long as the any of the
propN no longer holds. The problem is that I still need the "positive"
this memberOf p. How to solve this problem?
RULE2
when
p:Parent()
c1:Child(this memberOf p)
Child(
this memberOd p,
not(prop1==c1.prop1, ...propN==c1.propN)
)
then
retract(p);
(afaik, not supported)
any ideas?
18 years, 5 months