<div dir="ltr">What you have described is half of the usage of binding variables. You can bind a variable to a fact or to individual fields of a fact. You can then use those variables in the LHS or the RHS of your rules.<div style>

For example:</div><div style><br></div><div style>1.- Find different Person objects</div><div style><br></div><div style>when</div><div style>  $p1: Person($name1: name)</div><div style>  $p2: Person($name2: name, <b>this != $p1</b>)</div>

<div style>then</div><div style>  System.out.println(&quot;Found &quot;+$p1+&quot; with name &#39;&quot;+$name1+&quot;&#39; and &quot;+$p2+&quot; with name &#39;&quot;+$name2+&quot;&#39;&quot;);</div><div style>end</div>
<div style>
<br></div><div style>Regards,</div><div style> </div></div><div class="gmail_extra"><br clear="all"><div><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a></div>


<br><br><div class="gmail_quote">On Thu, May 9, 2013 at 3:08 PM, IPatel <span dir="ltr">&lt;<a href="mailto:ishita.patel@usbank.com" target="_blank">ishita.patel@usbank.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,<br>
<br>
I am having little bit difficulty in understanding  &quot;binding variable&quot;<br>
concept in the guvnor. During our POC a business user asked me question<br>
around this and i was able to save myself by telling them that the binding<br>
variable is used in case you want use the fact again in Then statement.<br>
(This is how i see it in the examples of rules).<br>
<br>
Can anyone please explaining me the real use of the binding variable so that<br>
i can help my business partner understand it properly?<br>
<br>
Thank you for your help in advance<br>
<br>
Isha<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Use-of-the-binding-variable-tp4023744.html" target="_blank">http://drools.46999.n3.nabble.com/Use-of-the-binding-variable-tp4023744.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>
</blockquote></div><br></div>