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 include this in your rule.<br>
<br>For example (in DRL terms, but possible to create in Guvnor):-<br><br>$p : Person()<br>PersonDetails ( this == $p, age &gt; 0 )<br><br><div class="gmail_quote">On 16 January 2012 11:40, 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">Thank you Manstis for quick response.I&#39;ve a small doubt in this Manstis.<br>
<br>
Actually My Main class PERSON source code is<br>
        RuleAgent agent = RuleAgent.newRuleAgent(&quot;/Guvnor.properties&quot;);<br>
                RuleBase rb = agent.getRuleBase();<br>
FactType appType = rb.getFactType(&quot;details.Personn&quot;);<br>
        Object application = appType.newInstance();<br>
        appType.set(application, &quot;age&quot;, 40);<br>
                rb.newStatelessSession().execute(new Object[] {application});<br>
WorkingMemory wm=rb.newStatefulSession();<br>
wm.fireAllRules();<br>
<br>
And my POJO class PersonDetails code is<br>
package com.sample;<br>
<br>
public class PersonDetails {<br>
public int age=40;<br>
public String name=&quot;drools&quot;;<br>
public int getAge() {<br>
        return age;<br>
}<br>
public void setAge(int age) {<br>
        this.age = age;<br>
}<br>
public String getName() {<br>
        return name;<br>
}<br>
public void setName(String name) {<br>
        <a href="http://this.name" target="_blank">this.name</a> = name;<br>
}<br>
}<br>
<br>
Now my BRL in guvnor is(As per your instructions)<br>
rule &quot;brl1&quot;<br>
            dialect &quot;mvel&quot;<br>
3.      |           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>
<br>
Even it is equal to 40,Im unable to see WELCOME drools message in guvnor<br>
5.3.I uploaded PersonDetails POJO class in that package,it is uploaded and<br>
I&#39;m able to see that model in that package,But one error I&#39;m always seeing<br>
one message when I&#39;m saving changes in uploaded model..&quot;Unable to save,it<br>
was recently updated by guest&quot;.Does this error affects my source code of<br>
BRL..I didnt get what is the wrong in my BRL.<br>
<br>
Could you please suggest me what the wrong thing i coded here..Please<br>
<br>
Thanks<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-tp3662420p3662934.html" target="_blank">http://drools.46999.n3.nabble.com/Calling-POJO-class-get-Method-in-BRL-tp3662420p3662934.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>