Assuming:-<br><br><span style="font-family:courier new,monospace">Phone()</span> <span style="font-family:courier new,monospace">{</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  String number;</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">  PhoneTC phoneTc;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
}</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">
PhoneTC()</span><span style="font-family:courier new,monospace"> {</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  String tc;</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
}</span><br style="font-family:courier new,monospace"><br>Then something like this should work:-<br><br><span style="font-family:courier new,monospace">when</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">  Phone( $n1 : number, $tc : phoneTc.tc )</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">  Phone( number == $n1, phoneTc.tc != $tc )</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">then</span><br style="font-family:courier new,monospace">
<br><br><div class="gmail_quote">On 2 April 2012 15:19, arup <span dir="ltr">&lt;<a href="mailto:arup4u2007@gmail.com">arup4u2007@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,<br>
i&#39;m having some problems(more like i&#39;m just getting confused) while creating<br>
a rule for my project.<br>
I have 2 classes say Phone() and PhoneTC() like below:<br>
<br>
Phone()<br>
{<br>
String number;<br>
}<br>
<br>
PhoneTC()<br>
{<br>
String tc;<br>
}<br>
<br>
also PhoneTC() is inside the Phone() class. like:<br>
<br>
Phone()--String number<br>
             PhoneTC()--------String tc<br>
<br>
<br>
<br>
now i need to create a rule like this....<br>
<br>
when phone numbers are same and the tc values are different for that number<br>
then do something.<br>
<br>
will this work??<br>
<br>
when<br>
ph1: Phone(number1 : number)<br>
phtc1: PhoneTC(tc1 : tc)<br>
Phone(number == number1) and PhoneTC(tc != tc1)<br>
then<br>
........<br>
<br>
<br>
can u suggest better rule for the requirement??.... thanks in advance... :)<br>
:) :)<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/drl-problem-tp3877814p3877814.html" target="_blank">http://drools.46999.n3.nabble.com/drl-problem-tp3877814p3877814.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>