<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText40129 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>
<DIV id=idOWAReplyText34721 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Hi </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>I hava a rule file as:</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT size=2>
<P align=left><STRONG>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</STRONG></P>
<P align=left><STRONG>&lt;package name="rules"</STRONG></P>
<P align=left><STRONG>xmlns="http://drools.org/drools-4.0"</STRONG></P>
<P align=left><STRONG>xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"</STRONG></P>
<P align=left><STRONG>xs:schemaLocation="http://drools.org/drools-4.0 drools-4.0.xsd"&gt;</STRONG></P>
<P align=left><STRONG></STRONG></P>
<P align=left><STRONG>&lt;import name="com.wipro.rfq.report.bean.Validator.RFQBean" /&gt;</STRONG></P>
<P align=left><STRONG>&lt;global identifier="rfq" type="com.wipro.rfq.report.bean.Validator.RFQBean" /&gt;</STRONG></P>
<P align=left><STRONG>&lt;import name="com.wipro.loan.validation.bean.Final.LoanApplicationBean" /&gt;</STRONG></P>
<P align=left><STRONG>&lt;global identifier="loanApplication" type="com.wipro.loan.validation.bean.Final.LoanApplicationBean" /&gt;</STRONG></P>
<P align=left><STRONG></STRONG></P>
<P align=left><STRONG></STRONG></P>
<P align=left><STRONG>&lt;rule name="Check_NotNullof_rfqId"&gt; </STRONG></P>
<P align=left><STRONG>&lt;rule-attribute name="agenda-group" value="Check"/&gt;</STRONG></P>
<P align=left><STRONG>&lt;rule-attribute name="auto-focus" value="true"/&gt;</STRONG></P>
<P align=left><STRONG>&lt;lhs&gt;</STRONG></P>
<P align=left><STRONG>&lt;eval&gt;(rfq.getM_rfqId() ==null) || (rfq.getM_rfqId().trim().equals(""))&lt;/eval&gt;</STRONG></P>
<P align=left><STRONG>&lt;/lhs&gt;</STRONG></P>
<P align=left><STRONG>&lt;rhs&gt;</STRONG></P>
<P align=left><STRONG>System.out.println("The value of m_rfqId is null.");</STRONG></P>
<P align=left><STRONG>&lt;/rhs&gt;</STRONG></P>
<P align=left><STRONG>&lt;/rule&gt; </STRONG></P>
<P align=left><STRONG></STRONG></P>
<P align=left><STRONG></STRONG></P>
<P align=left><STRONG>&lt;rule name="Check_NotNullof_partId"&gt; </STRONG></P>
<P align=left><STRONG>&lt;rule-attribute name="agenda-group" value="Check"/&gt;</STRONG></P>
<P align=left><STRONG>&lt;rule-attribute name="auto-focus" value="true"/&gt;</STRONG></P>
<P align=left><STRONG>&lt;lhs&gt;</STRONG></P>
<P align=left><STRONG>&lt;eval&gt;(rfq.getM_partId() =="null") || (rfq.getM_partId().trim().equals(""))&lt;/eval&gt;</STRONG></P>
<P align=left><STRONG>&lt;/lhs&gt;</STRONG></P>
<P align=left><STRONG>&lt;rhs&gt;</STRONG></P>
<P align=left><STRONG>System.out.println("The value of m_partId is null.");</STRONG></P>
<P align=left><STRONG>&lt;/rhs&gt;</STRONG></P>
<P align=left><STRONG>&lt;/rule&gt; </STRONG></P>
<P align=left><STRONG></STRONG></P>
<P align=left><STRONG>&lt;rule name="validate_FullName"&gt;</STRONG></P>
<P align=left><STRONG>&lt;rule-attribute name="agenda-group" value="validate-bean"/&gt;</STRONG></P>
<P align=left><STRONG>&lt;rule-attribute name="auto-focus" value="true"/&gt;</STRONG></P>
<P align=left><STRONG>&lt;lhs&gt;</STRONG></P>
<P align=left><STRONG>&lt;eval&gt;true&lt;/eval&gt;</STRONG></P>
<P align=left><STRONG>&lt;/lhs&gt;</STRONG></P>
<P align=left><STRONG>&lt;rhs&gt;</STRONG></P>
<P align=left><STRONG>System.out.println("full name is null from xml");</STRONG></P>
<P align=left><STRONG>&lt;/rhs&gt;</STRONG></P>
<P align=left><STRONG>&lt;/rule&gt;</STRONG></P>
<P align=left><STRONG></STRONG></P>
<P align=left><STRONG></STRONG></P>
<P><STRONG>&lt;/package&gt;</STRONG></P>
<P>As for the first two rules i declared the agenda group as "Check".</P>
<P>Now i want to know that how&nbsp;will i write the code in my java program to&nbsp;activate this agenda group instead of "MAIN".</P>
<P>I have already tried with the following option:</P><FONT size=2>
<P><STRONG>Agenda agenda=workingMemory.getAgenda();</STRONG></P><FONT size=2>
<P><STRONG>AgendaGroup Check=agenda.getAgendaGroup(</STRONG></FONT><STRONG><FONT color=#2a00ff size=2>"Check"</FONT><FONT size=2>);</FONT></STRONG></P><FONT size=2><FONT size=2>
<P><STRONG>workingMemory.setFocus(Check);</STRONG></P><FONT size=2>
<P><STRONG>workingMemory.fireAllRules();</STRONG></P>
<P>But after this when i wrote <STRONG><FONT size=2>System.</FONT><I><FONT color=#0000c0 size=2>out</I></STRONG></FONT><STRONG><FONT size=2>.println(</FONT><FONT color=#2a00ff size=2>"The focussed agenda group is "</FONT><FONT size=2>+workingMemory.getFocus());</FONT></STRONG></P>
<P><FONT size=2>Then the output was <FONT size=2><STRONG>The focussed agenda group is AgendaGroup 'MAIN'</STRONG></FONT></FONT></P>
<P><FONT size=2><FONT size=2>So now could you please help me.</P></FONT></FONT></FONT></FONT></FONT></FONT></FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV></DIV>
<DIV id=idSignature69254 dir=ltr>
<DIV><FONT face=Arial><EM><STRONG>With Regards</STRONG></EM></FONT></DIV>
<DIV><FONT face=Arial><EM><STRONG>Prateek </STRONG></EM></FONT></DIV>
<DIV><FONT face=Arial><EM><STRONG></STRONG></EM></FONT>&nbsp;</DIV></DIV></FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV></DIV>
<DIV id=idSignature28775 dir=ltr>&nbsp;</DIV></BODY></HTML>
<table><tr><td bgcolor=#ffffff><font color=#000000><br>
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. <br>
<br>
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.<br>
 <br>
www.wipro.com<br>
</font></td></tr></table>