Re: [rules-users] Why all rule condition fired when insert object in drools session?

2013-01-26 Thread Mark Proctor
On 26 Jan 2013, at 12:37, Zhao Yi wrote: > Hi Frank, > > Your proposal will definitely solve my issue. But from drools point of view, > only the rule who got focus is allowed to be fired. Why does drools runtime > check non-focus rule condition? I think this is useless check right? It's an intri

Re: [rules-users] Why all rule condition fired when insert object in drools session?

2013-01-26 Thread Wolfgang Laun
Look at it this way: if you load your gun only when you want to fire it, you'll be way too slow and likely to be shot dead before you can pull the trigger. ;-) This comparison is not entirely wanton. It's much more efficient for a Rete network to deal with all rules simultaneously than to maintain

Re: [rules-users] Why all rule condition fired when insert object in drools session?

2013-01-26 Thread Zhao Yi
Hi Frank, Your proposal will definitely solve my issue. But from drools point of view, only the rule who got focus is allowed to be fired. Why does drools runtime check non-focus rule condition? I think this is useless check right? In addition, what do you mean by "the agenda-group is faster than

Re: [rules-users] Why all rule condition fired when insert object in drools session?

2013-01-24 Thread FrankVhh
Hi Zhao, You could insert a helper fact and use it as a first pattern in your conditions. That way, the engine will not evaluate too many patterns from rules that are not to be executed. When ActiveGroup(name == "GroupA") ... Then ... Implications * You will have to take care of the