<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:"Courier New";}
span.E-MailFormatvorlage19
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=DE link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I&#8217;m new to Drools and currently
trying to implement some examples using CEP / Fusion. I got stuck on a problem
to which I can&#8217;t find any solution in the online documentation, so
I&#8217;m hoping for your help.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I&#8217;m trying to write a rule, which is
activated whenever a certain event occurs and no event of the same type
occurred in the e.g. last 5 minutes (or just at the same time). I know how to
do it if these are events of different types, but I can&#8217;t find any way
for events of the same type. What I tried is something like that:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:black'>$error :
RouterErrorEvent ( $name : routerName ) </span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#960000'>from</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
entry-point </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:green'>&quot;abc&quot;</span><span lang=EN-US style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:black'>not ($otherError : RouterErrorEvent ( (</span><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Courier New";color:#960000'>this</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
coincides $error) &amp;&amp; (routerName == $name) ) </span><b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#960000'>from</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>
entry-point </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";
color:green'>&quot;abc&quot;)</span><span lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>First of all there&#8217;s the problem,
that $error and $otherError will be the same instance if a
&#8220;RouterEventError&#8221; has been inserted from the &#8220;abc&#8221;
entry point. Adding a (this != $error) to the second, ($otherError) obviously
is no solution to that as well. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>If it were two different events something
like in example 2.19 would work:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>$error1
: ErrorOneEvent( $id : id ) <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>not
($error2 : ErrorTwoEvent( id == $id, this coincides $error1 ))<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I&#8217;m kinda sure I&#8217;m missing
something pretty &#8220;easy&#8221; here&#8230; or is this approach completely
wrong?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>As I&#8217;m aware of the fact that I
couldn&#8217;t be more of a newbie </span><span lang=EN-US style='font-family:
Wingdings'>J</span><span lang=EN-US> I would appreciate any suggestions for
nice tutorials or further reading as well!<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Thanks in advance!<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Georg</span><o:p></o:p></p>

</div>

</body>

</html>