<br>    It is hard to know what is wrong from the code snippets. Can you provide the full test case so that I can reproduce locally? If so, plz open a JIRA, attach the test case and ping me.<br><br>    I am moving today, so I will probably not be much responsive till next week, but I will try to look into this asap.<br>
<br>    []s<br>    Edson<br><br><br><br><div class="gmail_quote">2009/7/2 PriyaKathan <span dir="ltr">&lt;<a href="mailto:nash.8103@gmail.com">nash.8103@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>Here is the Code Snippet:</div><div><br></div><div>            currentTimeStamp = getCurrentTimeStamp(tuple, schArray);// the method will the timestamp of the tuple </div><div>      </div><div>            this.clock.advanceTime(currentTimeStamp - clock.getCurrentTime(), TimeUnit.MILLISECONDS);</div>

<div>            this.ruleSession.fireAllRules();</div><div><br></div><div>I use Pseudoclock. The events are fed into the engine as stream of data.</div><br><div class="gmail_quote">2009/7/2 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>&gt;</span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>   Since you are not declaring to the rules engine what is the timestamp attribute, the engine uses the timestamp of the session clock at event insertion. What kind of session clock are you using? how are you firing your rules (fireAllRules() or fireUntilHalt())? How frequently are you feeding the events into the working memory?<br>


<br>   []s<br>   Edson<br><br><div class="gmail_quote">2009/7/2 PriyaSha <span dir="ltr">&lt;<a href="mailto:nash.8103@gmail.com" target="_blank">nash.8103@gmail.com</a>&gt;</span><div><div></div><div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<br>
Requirement:<br>
<br>
To identify those tickets with &quot;critical&quot; severity  which occurs after<br>
2minutes but before 5minutes of a ticket with severity &#39;warning&#39;, provided<br>
both are of different application name.<br>
<br>
This rule though not meaningful, is considered to understand the temporal<br>
operator.<br>
<br>
This is the rule:<br>
<br>
declare OMNewTicket<br>
    @role( event )<br>
    @expires (10m)<br>
end<br>
<br>
rule &quot;Sample Temporal&quot;<br>
salience 10<br>
no-loop true<br>
when<br>
        $ticket : OMNewTicket(severity == &quot;warning&quot;, $appName : appName)<br>
        $ticket1 : OMNewTicket(this after[2m, 5m] $ticket, severity == &quot;critical&quot;,<br>
appName != $appName)<br>
then<br>
        String $s = &quot;&quot;;<br>
        String $s1 = &quot;&quot;;<br>
        if ( $ticket != null) {<br>
                $s = formatDate($ticket.getReceivingTime());<br>
        }<br>
        if ( $ticket1 != null ) {<br>
                $s1 = formatDate($ticket1.getReceivingTime());<br>
        }<br>
        drools.getWorkingMemory().setGlobal( &quot;output&quot;, &quot;found&quot;);<br>
        drools.getWorkingMemory().setGlobal( &quot;output1&quot;, $s);<br>
        drools.getWorkingMemory().setGlobal( &quot;output2&quot;, $s1);<br>
end<br>
<br>
function String formatDate( String inputDate ) {<br>
    try {<br>
        DateFormat formatter = new SimpleDateFormat(&quot;MM/dd/yy:hh:mm:aaa&quot;);<br>
        Date date = (Date)formatter.parse(inputDate);<br>
        return date.toString();<br>
    } catch (ParseException e) {<br>
        System.out.println(&quot;Exception :&quot;+e);<br>
        return null;<br>
    }<br>
}<br>
<br>
Input:<br>
<br>
14178           10/25/2008:9:33:AM              critical                TCS_Tibco_AMS_Email<br>
14178           10/25/2008:9:49:AM              warning         NETLOGON<br>
14178           10/25/2008:9:58:AM              warning         NETLOGON<br>
14178           10/25/2008:10:00:AM             warning         crypt32<br>
14178           10/25/2008:10:00:AM             warning         crypt32<br>
14178           10/25/2008:10:00:AM             warning         crypt32<br>
14178           10/25/2008:10:03:AM             warning         crypt32<br>
14178           10/25/2008:10:04:AM             warning         Symantec<br>
14178           10/25/2008:10:05:AM             critical                Windows SharePoint Services 3<br>
14178           10/25/2008:10:08:AM             critical                OVIS<br>
14178           10/25/2008:10:10:AM             critical                Office SharePoint Server<br>
14225           12/11/2008:3:25:AM              warning         ASBDSM<br>
14225           12/11/2008:3:25:AM              warning         WinDiskSpace<br>
14225           12/11/2008:3:25:AM              critical                OVIS<br>
14225           12/11/2008:3:30:AM              normal          OVIS<br>
14225           12/11/2008:3:34:AM              critical                TCS_Tibco_AMS_Email<br>
<br>
Output:<br>
Status         Time of Ticket            Timestamp of  Ticket1  Time (Clock)<br>
found               Sat Oct 25 10:00:00    Sat Oct 25 10:05:00    Sat Oct 25<br>
10:05:00<br>
found               Sat Oct 25 10:00:00    Sat Oct 25 10:08:00    Sat Oct 25<br>
10:08:00<br>
found               Sat Oct 25 10:04:00    Sat Oct 25 10:10:00    Sat Oct 25<br>
10:10:00<br>
found               Thu Dec 11 03:25:00   Thu Dec 11 03:34:00 Thu Dec 11<br>
03:34:00<br>
<br>
Here Time of Ticket is output1 from rule and Timestamp of  Ticket1 is<br>
output2 of the consequence.<br>
<br>
Problem :<br>
<br>
The output  &#39;found               Thu Dec 11 03:25:00   Thu Dec 11 03:34:00<br>
Thu Dec 11 03:34:00 &#39; is not satisfying the rule condition.<br>
After first three output, there are no tuples matching the criteria<br>
mentioned. Unable to predict the occurence of this in the output.<br>
<br>
May I know what i miss here?<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://www.nabble.com/Unpredicatable-output-with-Temporal-rule-tp24307147p24307147.html" target="_blank">http://www.nabble.com/Unpredicatable-output-with-Temporal-rule-tp24307147p24307147.html</a><br>



Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com" target="_blank">www.jboss.com</a><br>


</font><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div></div></div><br><br clear="all"><br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>