[rules-users] LHS reuse?

Barry Kaplan groups1 at memelet.com
Wed Jun 18 12:16:36 EDT 2008


I have a set of rules that /all/ contain the following condition...

positionQuantityAllocatedToLegs : 
        Integer(intValue < position.quantity)
        from accumulate( StrategyLeg(priority > 1, instrument == equity,
                                                 longShort ==
LongShort.LONG, legQuantity : quantity )
                                                 legsQuantity(legQuantity) )   

...the only difference being the values for the StrategyLeg. 

It would be very nice if there was some way to create reusable LHS
constructs, say maybe something like:

positionQuantityAllocatedToLegs : legsAllocation(1, position.quantity,
LongShort.LONG)

Where 'legsAllocation' is replaced with the condition above. Is there such a
mechanism, or need I simply live with large amounts of duplication in my
LHS?

thanks!
                                            
-- 
View this message in context: http://www.nabble.com/LHS-reuse--tp17986260p17986260.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list