On 22 October 2010 09:14, Ayush <span dir="ltr"><<a href="mailto:ayush.vatsyayan@alcatel-lucent.com">ayush.vatsyayan@alcatel-lucent.com</a>></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've synchronized<br>
the function which is creating session, session is static and is only called<br>
once, and firing the rules it's working fine. I'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've following rule rule<br>
<br>
"TwoAlertsFromSameSource"<br>
no-loop true<br>
dialect "mvel"<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("#### Running TwoAlertsFromSameSource... ####");<br>
modify($alertB) {<br>
setCorrelationState("Main");<br>
}<br>
<br>
System.out.println("correlation state "+$alertB.getCorrelationState());<br>
<br>
modify($alertA) {<br>
setCorrelationState("Lower");<br>
}<br>
end<br>
<br>
In above rules it'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>