Jeremy is right. In the log you can see 2 activations (one for each fact
you insert), then the execution of one of the activations and then
the cancellation of the other. How many rules do you have in your kbase? Is
your rule as simple as the one you posted? Do you have more than just 1
condition in your LHS? Are you doing anything else other than the
system.out in your RHS?
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Blog @
On Fri, Feb 8, 2013 at 4:17 PM, Jeremy Ary <jeremy.ary(a)gmail.com> wrote:
==>[ActivationCancelledEvent: getCause()=CLEAR,
getActivation()=[Activation
rule=TEST, act#=0, salience=0, tuple=[fact 0:1:30100654:78406:1:DEFAULT:
ONE]
There's definitely something cancelling the activation, but it's not
apparent to me right-out what's causing it based on the information
provided so far. To Estaban's comment, would it be possible to share an
isolated example as I can't help but to think there's something missing
from what we've seen so far that would cause this to occur.
On Fri, Feb 8, 2013 at 9:14 AM, Jeremy Ary <jeremy.ary(a)gmail.com> wrote:
> Actually, incorrect, I misread the output, sorry.
>
>
> On Fri, Feb 8, 2013 at 9:12 AM, Jeremy Ary <jeremy.ary(a)gmail.com> wrote:
>
>> It appears you have a rule named CLEAR not included in the original post
>> that's cancelling the activation that should println ONE, can you share
>> this rule with us?
>>
>>
>> On Fri, Feb 8, 2013 at 9:10 AM, pdario <dario.piantanida(a)gmail.com>wrote:
>>
>>> I'll try to make it; in the meanwhile, do you find this meaningful?
>>>
>>> ==>[ActivationCreatedEvent: getActivation()=[Activation rule=TEST,
>>> act#=0,
>>> salience=0, tuple=[fact 0:1:30100654:78406:1:DEFAULT:ONE]
>>> ],
>>> getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@4703c
>>> ]
>>> ==>[ObjectInsertedEventImpl: getFactHandle()=[fact
>>> 0:1:30100654:78406:1:DEFAULT:ONE], getObject()=ONE,
>>> getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@4703c
>>> ,
>>> getPropagationContext()=PropagationContextImpl [activeActivations=0,
>>> dormantActivations=0, entryPoint=EntryPoint::DEFAULT, factHandle=[fact
>>> 0:1:30100654:78406:1:DEFAULT:ONE], leftTuple=null, originOffset=-1,
>>> propagationNumber=3, rule=null, type=0]]
>>> ==>[ActivationCreatedEvent: getActivation()=[Activation rule=TEST,
>>> act#=1,
>>> salience=0, tuple=[fact 0:2:30649454:83500:2:DEFAULT:TWO]
>>> ],
>>> getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@4703c
>>> ]
>>> ==>[ObjectInsertedEventImpl: getFactHandle()=[fact
>>> 0:2:30649454:83500:2:DEFAULT:TWO], getObject()=TWO,
>>> getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@4703c
>>> ,
>>> getPropagationContext()=PropagationContextImpl [activeActivations=1,
>>> dormantActivations=0, entryPoint=EntryPoint::DEFAULT, factHandle=[fact
>>> 0:2:30649454:83500:2:DEFAULT:TWO], leftTuple=null, originOffset=-1,
>>> propagationNumber=4, rule=null, type=0]]
>>> TWO
>>> ==>[BeforeActivationFiredEvent: getActivation()=[Activation rule=TEST,
>>> act#=1, salience=0, tuple=[fact 0:2:30649454:83500:2:DEFAULT:TWO]
>>> ],
>>> getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@4703c
>>> ]
>>> ==>[ActivationCancelledEvent: getCause()=CLEAR,
>>> getActivation()=[Activation
>>> rule=TEST, act#=0, salience=0, tuple=[fact
>>> 0:1:30100654:78406:1:DEFAULT:ONE]
>>> ],
>>> getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@4703c
>>> ]
>>> ==>[AfterActivationFiredEvent: getActivation()=[Activation rule=TEST,
>>> act#=1, salience=0, tuple=[fact 0:2:30649454:83500:2:DEFAULT:TWO]
>>> ],
>>> getKnowledgeRuntime()=org.drools.impl.StatefulKnowledgeSessionImpl@4703c
>>> ]
>>> Direct Line, l'assicurazione online con il famoso Telefono Rosso e il
>>> Mouse
>>> sulle Ruote. Nel 1985 Direct Line ha rivoluzionato il mercato nel Regno
>>> Unito lanciando per prima la vendita diretta di polizze auto. In Italia
>>> ha
>>> vinto nel 2008 il primo premio per i clienti piu' soddisfatti.
>>>
www.directline.it RESTRICTED: This e-mail (including any linked or
>>> attached
>>> documents) is intended for the addressee/s only and may contain
>>> confidential, proprietary or legally privileged information. Please do
>>> not
>>> distribute further without prior permission from the author
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>>
http://drools.46999.n3.nabble.com/Evaluate-rules-for-multiple-facts-of-th...
>>> Sent from the Drools: User forum mailing list archive at
Nabble.com.
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users