<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 04/08/2010 09:34, Wolfgang Laun wrote:
<blockquote
cite="mid:AANLkTimhFFLg410MmhY8fuv9S_O2mUkMp6SJoS=3vxdp@mail.gmail.com"
type="cite">The enum type defines three values as indication for
an activation's cancellation.<br>
WME_MODIFY, FILTER and CLEAR. Since I was missing something, I
looked<br>
and found that CLEAR is used for two very much different reasons:<br>
- due to Agenda.clear()<br>
- when deleting a rule.<br>
</blockquote>
Filter is the result of the agenda-filter causing the activation to
cancel:<br>
if ( filter == null || filter.accept( item )
) {<br>
// fire it<br>
fireActivation( item );<br>
result = true;<br>
} else {<br>
// otherwise cancel it and try the next<br>
final EventSupport eventsupport =
(EventSupport) this.workingMemory;<br>
<br>
eventsupport.getAgendaEventSupport().fireActivationCancelled( item,<br>
this.workingMemory,<br>
ActivationCancelledCause.FILTER );<br>
tryagain = true;<br>
}<br>
<br>
WME_MODIFY is the result of any wme action that causes an activation
to be cancelled.<br>
<br>
CLEAR is the result of a forced cancellation of an activation,
either be explicitely calling clear or removing a rule. <br>
<br>
I agree we could probably split that out and have a KB_MODIFY, so
that if the activation is cancelled as a result the rule being
removed we get a different event.<br>
<br>
Mark<br>
<blockquote
cite="mid:AANLkTimhFFLg410MmhY8fuv9S_O2mUkMp6SJoS=3vxdp@mail.gmail.com"
type="cite"><br>
Is this intentional?<br>
<br>
-W<br>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>