On 22 October 2010 09:14, Ayush <span dir="ltr">&lt;<a href="mailto:ayush.vatsyayan@alcatel-lucent.com">ayush.vatsyayan@alcatel-lucent.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thank you for your reply.<br>
<br>
I think I was heading into the wrong direction. Now when I&#39;ve synchronized<br>
the function which is creating session, session is static and is only called<br>
once, and firing the rules it&#39;s working fine. I&#39;m planning to use JMS<br>
wherein consumer will be syncronized. Is this the right way?<br></blockquote><div><br>Should be OK.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
But I&#39;ve following rule rule<br>
<br>
&quot;TwoAlertsFromSameSource&quot;<br>
        no-loop true<br>
        dialect &quot;mvel&quot;<br>
        when<br>
                $RA : AlertReceivedEvent( severity == 2, $entityA : entity ) over<br>
window:time(60s) from entry-point NotificationStream<br>
                $RB : AlertReceivedEvent( this != $RA, severity == 1, $entityB : entity )<br>
over window:time(60s) from entry-point NotificationStream<br>
                $alertB : X733Alert(this.entity == $entityB, correlationState !=<br>
CorrelationStates.ROOT_CAUSE)<br>
                $alertA : X733Alert(this.entity == $entityA, correlationState !=<br>
CorrelationStates.SYMPATHETIC)<br>
        then<br>
                System.out.println(&quot;#### Running TwoAlertsFromSameSource... ####&quot;);<br>
                modify($alertB) {<br>
                        setCorrelationState(&quot;Main&quot;);<br>
                }<br>
<br>
                System.out.println(&quot;correlation state &quot;+$alertB.getCorrelationState());<br>
<br>
                modify($alertA) {<br>
                        setCorrelationState(&quot;Lower&quot;);<br>
                }<br>
end<br>
<br>
In above rules it&#39;s unable to modify $alertB</blockquote><div><br>This looks fine, and if $alertA is modified, $alertB will be, too -  unless <a href="http://s.th">s.th</a>. else<br>is in error. One possibility is that $alertA and $alertB refer to the same fact and the<br>
2nd modify ovwrites the 1st.<br>-W<br></div></div><br>