As an alternative, use different classes for the parameter containers. There could be one called Ssn (just ssn), one SsnCitizen, etc.<br><br>    SsnCitizen( $ssn : ssn, $citizenship : citizenship )<br>
    Person( ssn = $ssn, citizenship == $citizenship )<br><br>Be careful, though, and DO NOT make SsnCitizen a subclass of Ssn. The parameter classes you use must be on the same inheritance level.<br><br>-W<br><br><div class="gmail_quote">
2011/10/20 Michael Anstis <span dir="ltr">&lt;<a href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The same principle applies, but instead of inserting a single SSN container, you insert a generic &quot;parameters&quot; container:-<br><br>rule &quot;rule 1&quot;<br>when<br>    Parameters( rule == &quot;rule 1&quot;, $ssn : ssn, $citizenship : citizenship )<br>

    Person( ssn = $ssn, citizenship == $citizenship )<br>then<br>    ....<br><br>If your parameters are more generic Parameters could contain a Map instead of explicit parameters and change the Person pattern accordingly.<br>

<br>It&#39;d be good to be able to extract the rule name in the LHS, but I don&#39;t think this is possible (anybody?)<br><br>Cheers,<br><br>Mike<br><br><div class="gmail_quote">On 19 October 2011 22:35, bharath87 <span dir="ltr">&lt;<a href="mailto:craze.stuff@gmail.com" target="_blank">craze.stuff@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Michael,<br>
              Thanks for your reply... consider the situation where there<br>
are lot of rules each of which might or might not have unique input<br>
contraints..<br>
<br>
for e.g.<br>
<br>
rule &quot;Rule1&quot;<br>
<br>
     when<br>
            Person ( ssn == &quot;input1&quot; )<br>
     then<br>
            .....<br>
<br>
end<br>
<br>
rule &quot;Rule2&quot;<br>
<br>
    when<br>
           Person ( ssn == &quot;input2&quot; and citizenship == &quot;inputCountry&quot; )<br>
    then<br>
          .....<br>
end<br>
<br>
In the above scenario the ssn input for Rule1 differs from the ssn input for<br>
Rule2, if i use SSN() facts i will have the rules fire for each ssn facts<br>
present in the working memory.<br>
<br>
what do i do?<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/externalization-of-input-constraints-in-a-rule-tp3435495p3435834.html" target="_blank">http://drools.46999.n3.nabble.com/externalization-of-input-constraints-in-a-rule-tp3435495p3435834.html</a><br>


</font><div><div></div><div>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" target="_blank">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>
<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>
<br></blockquote></div><br>