hi folks
We are working on a requirement that requires us to have multiple rules that
could fire for a given input and for all the rules that fire, we would want
to cumulate the consequence to reach the final consequence.
As an example, if we want to identify the credit score for a person,
Why not use a Fact that contains your result?
In DRL terms it'd look like this:-
rule one
when
$r : Result( $score : score )
Applicant( numberOfLoans 1 )
then
$r.setScore( $score + 5 );
update( $r );
end
rule two
when
$r : Result( $score :
Thanks a billion mantis!
We do think this would work; let me try it and confirm.
--
View this message in context:
http://drools.46999.n3.nabble.com/Rules-that-cumulate-on-consequence-tp3530214p3530252.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
Good idea,
but note that it will only work properly in a stateless session (which
is most likely in his case).
In a stateful session, with multiple fireAllRules and when the
applicant's properties change between those fireAllRules call,
the trick is to do an insertLogical of a ScoreDiff
It will work properly in a stateless session ... in sequential mode ...
may be.
This rule for instance, will loop by itself (and all other will also
loop), in a stateless or statefull session :
rule one
when
$r : Result( $score : score )
Applicant( numberOfLoans 1 )
Yay, a great improvement :)
2011/11/23 Vincent Legendre vincent.legen...@eurodecision.com
It will work properly in a stateless session ... in sequential mode ...
may be.
This rule for instance, will loop by itself (and all other will also
loop), in a stateless or statefull session :
rule