In your rule do the following:-<br><ul><li>Add PersonDetails fact</li><li>Add Person fact</li><li>Add a constraint for PersonDetails.age (> 0 would be a good choice).</li><li>Bind age field to a variable (click on field name in the constraint and you're given the choice to set it to a variable)</li>
<li>Add a constraint for Person.age (set equal to a bound variable).</li></ul>This is based upon 5.3.0.Final.<br><br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 16 January 2012 07:22, srinivasasanda <span dir="ltr"><<a href="mailto:srinivasasanda@gmail.com">srinivasasanda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I've a BRL with Person as a fact containing field name age(in sample<br>
package).<br>
<br>
Now,I've a POJO class named PersonDetails with fields age,name with its<br>
getters,setters methods.Now I uploaded that POJO model in that sample<br>
package.<br>
<br>
Now,I need to check in When condition of brl whether age in Person fact is<br>
equal to the value obtained from getAge() method of PersonDetails POJO<br>
class.<br>
<br>
When I used guided editor it is giving as age is equal to 1.Literal<br>
Value,2.Expression editor,3.Formulae.<br>
<br>
How can i achieve that ??I should create new instance of PersonDetails p in<br>
When condition and i should call p.getAge() and that value must be compared<br>
to age in Person Fact.<br>
Can you please suggest me how to achieve this..<br>
<br>
Thanks<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Calling-POJO-class-get-Method-in-BRL-tp3662420p3662420.html" target="_blank">http://drools.46999.n3.nabble.com/Calling-POJO-class-get-Method-in-BRL-tp3662420p3662420.html</a><br>
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>
</font></span></blockquote></div><br>