[rules-users] setting different value in consequence ( RHS part) based on a conditional check

FrankVhh frank.vanhoenshoven at agserv.eu
Fri Jan 27 04:10:04 EST 2012


Hi Wolfgang,

Can I push you for a clarification on this statement?

Imho, any of the following reasons is good enough to put a "decision" in
rules
    A- The decision logic is likely to be subject to change
    B- The decision logic is too complex to implement in a procedural way
    C- The decision logic is making sense to business users. (i.e.
non-technical logic)

In this case, option B is opviously way off. But one can only guess
regarding A and C.

Regards,
Frank


laune wrote
> 
> Oh my, aren't we a wee bit too dogmatic? I've certainly been known as
> being
> a stickler to style and best practice and what not, but in this particular
> case I'd use a single rule and offload the earth-shaking decision between
> 'Y' and 'N' into a function:
> 
> rule x
> when
>    samplefact1( $status: status, state == "CA" )
> then
>    fact0.setField1(  yn( $status)  );
> end
> 
> Cheers
> -W
> _______________________________________________
> rules-users mailing list
> rules-users at .jboss
> https://lists.jboss.org/mailman/listinfo/rules-users
> 


--
View this message in context: http://drools.46999.n3.nabble.com/setting-different-value-in-consequence-RHS-part-based-on-a-conditional-check-tp3690826p3692750.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list