The rule seems ok. Of course you need to insert a PersonDetails object in your working memory if you want the rule to get activated. Please read Drools documentation to see rules&#39; life-cycle: <a href="http://docs.jboss.org/drools/release/5.4.0.Beta1/drools-expert-docs/html_single/index.html">http://docs.jboss.org/drools/release/5.4.0.Beta1/drools-expert-docs/html_single/index.html</a><div>

<br></div><div>Best Regards,<br clear="all"><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>


<br><br><div class="gmail_quote">On Mon, Jan 16, 2012 at 1:34 PM, srinivasasanda <span dir="ltr">&lt;<a href="mailto:srinivasasanda@gmail.com">srinivasasanda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Manstis,<br>
<div class="im"><br>
Where do you insert a PersonDetails fact?<br>
<br>
Why do you set the age on Person when you state it&#39;ll be in PersonDetails?<br>
<br>
You&#39;ll also need to have a relationship between Person and PersonDetails and<br>
include this in your rule.<br>
<br>
</div>Manstis,Let me explain my requirement precisely.age is the field in my POJO<br>
class which is set to 40.In the same way,I set the value of age which is in<br>
Person fact to 40 in my main executable class.<br>
<br>
Now,I need to compare age in POJO class(which is 40(hardcoded))and age in<br>
Person fact(which is set to 40 in the main Java class<br>
-appType.set(application, &quot;age&quot;, 40);)<br>
<br>
When these two ages are equal,I should print welcome drools.As both are<br>
40,the output must be Welcome Drools.<br>
<br>
Here is my BRL code.<br>
<div class="im">when<br>
4. |        PersonDetails( a : age &gt; 0 )<br>
5. |        Personn( age == a )<br>
6. |    then<br>
7. |        System.out.println(&quot;Welcome Drools&quot;);<br>
8. | end<br>
<br>
</div>Should i need to insert Model PersonDetails in the source code?I followed ur<br>
instructions to create BRL.Please help me in achieving my requirement<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Calling-POJO-class-get-Method-in-BRL-tp3662420p3663046.html" target="_blank">http://drools.46999.n3.nabble.com/Calling-POJO-class-get-Method-in-BRL-tp3662420p3663046.html</a><br>


</font></span><div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<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>
</div></div></blockquote></div><br></div>