<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Correlation of events</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi, </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I am working on a system where I need to correlate few error conditions happening in the network infrastructure. I have gone through the documentation for Jboss rules engine (Drools) and I am planning to use it for the correlation purpose. </FONT></P>
<P><FONT SIZE=2 FACE="Arial">Can anyone let me know a way in which I can get an object from workingmemory in the "then" part of the rule? For e.g., I need the following</FONT></P>
<BR>
<P><FONT SIZE=2 FACE="Arial">rule "new error"</FONT>
<BR> <FONT SIZE=2 FACE="Arial">when </FONT>
<BR> <FONT SIZE=2 FACE="Arial">$error : Error (state == NEW_ERROR)</FONT>
<BR> <FONT SIZE=2 FACE="Arial">then</FONT>
<BR> <FONT SIZE=2 FACE="Arial">(search workingmemory if this error was already registered)</FONT>
<BR> <FONT SIZE=2 FACE="Arial">if (found)</FONT>
<BR> <FONT SIZE=2 FACE="Arial">{</FONT>
<BR> <FONT SIZE=2 FACE="Arial">$errFromWorkingMemory.setLastTimestamp(currentTimestamp)</FONT>
<BR> <FONT SIZE=2 FACE="Arial">retract($error);</FONT>
<BR> <FONT SIZE=2 FACE="Arial">}</FONT>
<BR><FONT SIZE=2 FACE="Arial">End</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Thanks,</FONT>
<BR><FONT SIZE=2 FACE="Arial">Ashfaq</FONT>
</P>
<P>
<BR>
</P>
</BODY>
</HTML>