<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">got it...<br>i guess ive been using drools 2.x for too long...since beta 2.0 beta 17...<br>any other way to do the or's?<br><br><div>&nbsp;</div>Joel G. Rivera-Gonzalez<br>PRT<br><br>"The first 90% of a project takes 90% of the time, the last 10% takes the other 90% of the time" - Murphy's Law<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Edson Tirelli &lt;tirelli@post.com&gt;<br>To: Rules Users List &lt;rules-users@lists.jboss.org&gt;<br>Sent: Tuesday, January 9, 2007 8:12:05 PM<br>Subject: Re: [rules-users] About String..."==" same as ".equals"?<br><br><div>&nbsp;&nbsp; Joel,<br><br>&nbsp;&nbsp; No. Your mistake is on the mapping of objects x patterns. Let
 me show <br>you an example:<br><br>&nbsp;&nbsp; If you write a rule like this:<br><br>rule "expensive muzzarela"<br>when<br>&nbsp;&nbsp;&nbsp;&nbsp; Cheese( type == "muzzarela", price &gt; 50 )<br>then<br>&nbsp;&nbsp; // so something<br>end<br><br>&nbsp;&nbsp;&nbsp;&nbsp;You are saying the engine: "- match each SINGLE instance of Cheese <br>that is BOTH type == "muzzarela" AND whose price is greater than 50".<br><br>&nbsp;&nbsp;&nbsp;&nbsp;If you write a rule like this:<br><br>rule "one muzzarela and one expensive cheese"<br>when<br>&nbsp;&nbsp; Cheese( type == "muzzarela" )<br>&nbsp;&nbsp; Cheese( price &gt; 50 )<br>then<br>&nbsp;&nbsp; // do something<br>end<br><br>&nbsp;&nbsp;&nbsp;&nbsp;You are saying the engine: "- match each PAIR of Cheese instances, <br>where the FIRST instance is of type == "muzzarela" and the SECOND <br>instance is of any cheese that has price greater than 50".<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Do you see the difference?<br>
 <br>&nbsp;&nbsp;&nbsp;&nbsp;So, if you do:<br><br>workingMemory.assert( new Cheese("muzzarela", 70) );<br>workingMemory.fireAllRules();<br><br>&nbsp;&nbsp; Only the first rule will fire, because the second rule requires 2 <br>objects, one matching each constraint.<br><br>&nbsp;&nbsp; If you do:<br><br>workingMemory.assert( new Cheese("muzzarela", 10) );<br>workingMemory.assert( new Cheese("brie", 70) );<br>workingMemory.fireAllRules();<br><br>&nbsp;&nbsp; Only the second rule will fire, because the first rule requires that <br>a single object match BOTH constraints.<br><br>&nbsp;&nbsp; So, the above has nothing to do with variable bindings, but to make <br>clear, you can bind variables to each of the patterns you write, but you <br>can't use the same variable name for different patterns as each pattern <br>will match a different object.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;Also, please note that top level AND operator is optional as it is <br>already implicitly handled. So, the
 bellow rule is IDENTICAL to the one <br>I wrote above:<br><br>rule "one muzzarela and one expensive cheese"<br>when<br>&nbsp;&nbsp; Cheese( type == "muzzarela" ) AND<br>&nbsp;&nbsp; Cheese( price &gt; 50 )<br>then<br>&nbsp;&nbsp; // do something<br>end<br><br>&nbsp;&nbsp;&nbsp;&nbsp;I hope it clarified things a little bit. Let me know if you still <br>have questions.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;[]s<br>&nbsp;&nbsp;&nbsp;&nbsp;Edson<br><br><br>Joel G. Rivera-González wrote:<br><br>&gt; i see...<br>&gt; when 3.2 will be available?<br>&gt; :-)<br>&gt;<br>&gt; ok...<br>&gt; so i'm writing the rules the wrong way?<br>&gt; i need to put the and's on the same line separated by ','?<br>&gt; i if wanted to the it the way i wrote the rules i would have to put a <br>&gt; different name to each of the objects right? (mto1:MegaTransferObject <br>&gt; mto2:MegaTransferObject, ect)<br>&gt;<br>&gt; this is a little complicated and i dindt saw it on the <br>&gt; documentation...where i
 can read about it?<br>&gt; i will rewrite the rules to match the right way...<br>&gt;<br>&gt; thanks...<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;<br>&gt; Joel G. Rivera-Gonzalez<br>&gt; PRT<br>&gt;<br>&gt; "The first 90% of a project takes 90% of the time, the last 10% takes <br>&gt; the other 90% of the time" - Murphy's Law<br>&gt;<br>&gt;<br>&gt; ----- Original Message ----<br>&gt; From: Edson Tirelli &lt;tirelli@post.com&gt;<br>&gt; To: Rules Users List &lt;rules-users@lists.jboss.org&gt;<br>&gt; Sent: Tuesday, January 9, 2007 6:44:22 PM<br>&gt; Subject: Re: [rules-users] About String..."==" same as ".equals"?<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;Joel,<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;If it is the same object that you are trying to match against all of<br>&gt; those constraints, just list all your constraints separated by ',' <br>&gt; (comma):<br>&gt;<br>&gt; rule "dtv_discount_request"<br>&gt; when<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mto :
 MegaTransferObject( orders_FkOrderTypeId ==<br>&gt; Constants.NEW_COMPLETED_ORDER_TYPE,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ct:other_ChannelType -&gt;&nbsp;&nbsp;( !<br>&gt; ct.equalsIgnoreCase(Constants.CHANNEL_TYPE_RESELLER)),<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;orders_FkChannelId !=<br>&gt; Constants.ISP_CHANNEL_ID_PRW,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;orders_FkChannelId !=<br>&gt;
 Constants.ISP_CHANNEL_ID_TLD,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;orders_FkChannelId !=<br>&gt; Constants.ISP_CHANNEL_ID_AOL,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;other_HasDtvDiscountRequest == false,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pl:phoneList_GovernmentAccount -&gt; ( (pl<br>&gt; == null) || ( pl.equals(Constants.FLAG_NO))
 ),<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cp:customerProfile_DtvDiscount -&gt; ( (cp<br>&gt; == null) || ( cp.equals(Constants.FLAG_NO)) ),<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oa:other_AccountType -&gt; ( ( oa == null)<br>&gt; || ( oa.equals( Constants.PHONE_TYPE_RESIDENTIAL)) ) )<br>&gt; then<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; menu.add(new String[]{Constants.SERVICE_ASSURANCE_TREE_MENU_DSL,<br>&gt; Constants.SERVICE_ASSURANCE_MENU_DTV_DISCOUNT_REQUEST});<br>&gt; end<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Just remember:<br>&gt;<br>&gt; * you must have one and only one pattern for each single object you want<br>&gt; to match in
 each rule, i.e., the mapping between patterns and object<br>&gt; instances is always one-to-one.<br>&gt;<br>&gt; * constraints are separated by ',' (comma), and ',' has an implicit<br>&gt; meaning of AND between constraints<br>&gt;<br>&gt; * version 3.0.x does not support OR between constraints, so the way<br>&gt; around it is to use predicates like I demonstrated above. Version 3.2<br>&gt; already has support for connective OR constraints.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I hope it helps.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; []s<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Edson<br>&gt;<br>&gt;<br>&gt; Joel G. Rivera-González wrote:<br>&gt;<br>&gt; &gt; i see...that would works...but now if you add stuff and make a rule<br>&gt; &gt; that look like this, the binding will not work...<br>&gt; &gt;<br>&gt; &gt; rule "dtv_discount_request"<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 MegaTransferObject(orders_FkOrderTypeId ==<br>&gt; &gt; Constants.NEW_COMPLETED_ORDER_TYPE) and<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not MegaTransferObject(ct:other_ChannelType -&gt;&nbsp;&nbsp;<br>&gt; &gt; (ct.equalsIgnoreCase(Constants.CHANNEL_TYPE_RESELLER))) and<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (not MegaTransferObject(orders_FkChannelId ==<br>&gt; &gt; Constants.ISP_CHANNEL_ID_PRW) and<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not MegaTransferObject(orders_FkChannelId ==<br>&gt; &gt; Constants.ISP_CHANNEL_ID_TLD) and<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; not MegaTransferObject(orders_FkChannelId ==<br>&gt; &gt; Constants.ISP_CHANNEL_ID_AOL)) and<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (MegaTransferObject(phoneList_GovernmentAccount == null) or<br>&gt; &gt; MegaTransferObject(phoneList_GovernmentAccount == <br>&gt; Constants.FLAG_NO)) and<br>&gt;
 &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (MegaTransferObject(customerProfile_DtvDiscount == null) or<br>&gt; &gt; MegaTransferObject(customerProfile_DtvDiscount == <br>&gt; Constants.FLAG_NO)) and<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (MegaTransferObject(other_AccountType == null) or<br>&gt; &gt; MegaTransferObject(other_AccountType ==<br>&gt; &gt; Constants.PHONE_TYPE_RESIDENTIAL)) and<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MegaTransferObject(other_HasDtvDiscountRequest == false)<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; then<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; menu.add(new<br>&gt; &gt; String[]{Constants.SERVICE_ASSURANCE_TREE_MENU_DSL,<br>&gt; &gt; Constants.SERVICE_ASSURANCE_MENU_DTV_DISCOUNT_REQUEST});<br>&gt; &gt; end<br>&gt; &gt;&nbsp;&nbsp;<br>&gt; &gt; i was trying to bre creative and add megaTO: before all the<br>&gt; &gt; MegaTransferObject and it gave me the compilation error
 you<br>&gt; &gt; mention...but only after the third megaTO:<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; Joel G. Rivera-Gonzalez<br>&gt; &gt; PRT<br>&gt; &gt;<br>&gt; &gt; "The first 90% of a project takes 90% of the time, the last 10% takes<br>&gt; &gt; the other 90% of the time" - Murphy's Law<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ----- Original Message ----<br>&gt; &gt; From: Edson Tirelli &lt;tirelli@post.com&gt;<br>&gt; &gt; To: Rules Users List &lt;rules-users@lists.jboss.org&gt;<br>&gt; &gt; Sent: Tuesday, January 9, 2007 4:39:57 PM<br>&gt; &gt; Subject: Re: [rules-users] About String..."==" same as ".equals"?<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;Joel,<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;I just noticed in your last rule you do the binding to the same<br>&gt; &gt; variable:<br>&gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; megaTO:MegaTransferObject(other_AccountType == "RMS")<br>&gt; &gt;
 &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; megaTO:MegaTransferObject(other_HasDtvDiscountRequest == <br>&gt; false)<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;I thought that feature was already disabled... :( it should give you<br>&gt; &gt; an error of duplicate variable declaration! is it not raising an error<br>&gt; &gt; when compiling the rule??<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;The correct way of doing it if it is the same object is getting both<br>&gt; &gt; constraints in the same pattern:<br>&gt; &gt;<br>&gt; &gt; megaTO: MegaTransferObject( other_AccountType == "RMS",<br>&gt; &gt; other_HasDtvDiscountRequest == false)<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;So, rules 1 and 2 are correct in not firing, since you would need 2<br>&gt; &gt; different objects to match the 2 patterns in them.<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;The mapping between patterns and objects is "one-to-one".<br>&gt; &gt;<br>&gt;
 &gt;&nbsp;&nbsp;&nbsp;&nbsp;[]s<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;Edson<br>&gt; &gt;&nbsp;&nbsp;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; Joel G. Rivera-González wrote:<br>&gt; &gt;<br>&gt; &gt; &gt; 1. i downloaded the latest release from the download page...<br>&gt; &gt; &gt; 2. just one MTO...the returning arrayList should have arround 10 <br>&gt; values.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; will do an example and (class and ruleFile) and send it to your <br>&gt; email...<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; thanks<br>&gt; &gt; &gt;&nbsp;&nbsp;<br>&gt; &gt; &gt; Joel G. Rivera-Gonzalez<br>&gt; &gt; &gt; PRT<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; "The first 90% of a project takes 90% of the time, the last 10% takes<br>&gt; &gt; &gt; the other 90% of the time" - Murphy's Law<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; ----- Original Message ----<br>&gt; &gt; &gt; From: Edson Tirelli &lt;tirelli@post.com&gt;<br>&gt; &gt; &gt; To: Rules Users List
 &lt;rules-users@lists.jboss.org&gt;<br>&gt; &gt; &gt; Sent: Tuesday, January 9, 2007 3:29:26 PM<br>&gt; &gt; &gt; Subject: Re: [rules-users] About String..."==" same as ".equals"?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;Joel,<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;Your rules seems to be correct.<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;Questions:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; 1. What JBRules version are you using?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; 2. How many MTO instances are you asserting in the working memory, <br>&gt; that<br>&gt; &gt; &gt; would match each Pattern in your rule?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;It may be an issue with "or". Can you provide a self contained test<br>&gt; &gt; &gt; for me to investigate?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;Thank you<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edson<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;
 Joel G. Rivera-González wrote:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; i have to be doing something wrong...but it make no sense...<br>&gt; &gt; &gt; &gt; a MegaTransferObject is asserted.<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; case1: No rules fired.<br>&gt; &gt; &gt; &gt; rule "dtv_discount_request"<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MegaTransferObject(other_AccountType == null) or<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MegaTransferObject(other_AccountType ==<br>&gt; &gt; &gt; &gt; Constants.PHONE_TYPE_RESIDENTIAL)<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MegaTransferObject(other_HasDtvDiscountRequest == false)<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; then<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; menu.add(new<br>&gt; &gt; &gt; &gt;
 String[]{Constants.SERVICE_ASSURANCE_TREE_MENU_DSL,<br>&gt; &gt; &gt; &gt; Constants.SERVICE_ASSURANCE_MENU_DTV_DISCOUNT_REQUEST});<br>&gt; &gt; &gt; &gt; end<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; case 2: no rule fired.<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; rule "dtv_discount_request"<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MegaTransferObject(other_AccountType == null) or<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MegaTransferObject(other_AccountType == "RMS")<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MegaTransferObject(other_HasDtvDiscountRequest == false)<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; then<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; menu.add(new<br>&gt; &gt; &gt; &gt; String[]{Constants.SERVICE_ASSURANCE_TREE_MENU_DSL,<br>&gt; &gt; &gt; &gt;
 Constants.SERVICE_ASSURANCE_MENU_DTV_DISCOUNT_REQUEST});<br>&gt; &gt; &gt; &gt; end<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; case 3: rule fired<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;<br>&gt; &gt; &gt; &gt; rule "dtv_discount_request"<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; when<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; megaTO:MegaTransferObject(other_AccountType == "RMS")<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; megaTO:MegaTransferObject(other_HasDtvDiscountRequest ==<br>&gt; &gt; false)<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; then<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; menu.add(new<br>&gt; &gt; &gt; &gt; String[]{Constants.SERVICE_ASSURANCE_TREE_MENU_DSL,<br>&gt; &gt; &gt; &gt; Constants.SERVICE_ASSURANCE_MENU_DTV_DISCOUNT_REQUEST});<br>&gt; &gt; &gt; &gt; end<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; i really dont get it...<br>&gt; &gt; &gt; &gt; i must not be
 getting something...<br>&gt; &gt; &gt; &gt; help...<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; Joel G. Rivera-Gonzalez<br>&gt; &gt; &gt; &gt; PRT<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; "The first 90% of a project takes 90% of the time, the last 10% <br>&gt; takes<br>&gt; &gt; &gt; &gt; the other 90% of the time" - Murphy's Law<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; ----- Original Message ----<br>&gt; &gt; &gt; &gt; From: Edson Tirelli &lt;tirelli@post.com&gt;<br>&gt; &gt; &gt; &gt; To: Rules Users List &lt;rules-users@lists.jboss.org&gt;<br>&gt; &gt; &gt; &gt; Sent: Tuesday, January 9, 2007 7:26:35 AM<br>&gt; &gt; &gt; &gt; Subject: Re: [rules-users] About String..."==" same as ".equals"?<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;Joel,<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;This is the correct syntax and it works (at least we didn't
 get a<br>&gt; &gt; &gt; &gt; report for it not working yet):<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; Object(variable == Constants.value)<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;Can you please elaborate about the problem you are having in <br>&gt; order<br>&gt; &gt; &gt; &gt; for us to help solving it? If it is a bug we need to fix.<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;Thank you,<br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edson<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; Joel G. Rivera-González wrote:<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; most (if not all) of my rules will have conditions like this:<br>&gt; &gt; &gt; &gt; &gt; Object(variable == Constants.value)<br>&gt; &gt; &gt; &gt; &gt; this is not working...<br>&gt; &gt; &gt; &gt; &gt; BUT if i change the Constants.value to corresponding value <br>&gt; from the<br>&gt; &gt; &gt; &gt; &gt; constants class it will
 work...<br>&gt; &gt; &gt; &gt; &gt; is there any other way other than this Object(a:variable-&gt;&nbsp;&nbsp;<br>&gt; &gt; &gt; &gt; &gt; (a.equals(Constants.value)) to do it?<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp;<br>&gt; &gt; &gt; &gt; &gt; Joel G. Rivera-Gonzalez<br>&gt; &gt; &gt; &gt; &gt; PRT<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; "The first 90% of a project takes 90% of the time, the last 10%<br>&gt; &gt; takes<br>&gt; &gt; &gt; &gt; &gt; the other 90% of the time" - Murphy's Law<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; <br>&gt; &gt;------------------------------------------------------------------------<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt;_______________________________________________<br>&gt; &gt; &gt; &gt; &gt;rules-users mailing list<br>&gt; &gt; &gt; &gt; &gt;rules-users@lists.jboss.org<br>&gt; &gt;
 &gt; &gt; &gt;<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp;<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; --<br>&gt; &gt; &gt; &gt; Edson Tirelli<br>&gt; &gt; &gt; &gt; Software Engineer - JBoss Rules Core Developer<br>&gt; &gt; &gt; &gt; Office: +55 11 3124-6000<br>&gt; &gt; &gt; &gt; Mobile: +55 11 9218-4151<br>&gt; &gt; &gt; &gt; JBoss, a division of Red Hat @ <a target="_blank" href="http://www.jboss.com">www.jboss.com</a> &lt;<a target="_blank" href="http://www.jboss.com">http://www.jboss.com</a>&gt;<br>&gt; &gt; &lt;<a target="_blank" href="http://www.jboss.com">http://www.jboss.com</a>&gt; &lt;<a target="_blank" href="http://www.jboss.com">http://www.jboss.com</a>&gt;<br>&gt; &gt; &gt; &lt;<a target="_blank" href="http://www.jboss.com">http://www.jboss.com</a>&gt;<br>&gt; &gt; &gt;
 &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; _______________________________________________<br>&gt; &gt; &gt; &gt; rules-users mailing list<br>&gt; &gt; &gt; &gt; rules-users@lists.jboss.org<br>&gt; &gt; &gt; &gt; <a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; <br>&gt; &gt;------------------------------------------------------------------------<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;_______________________________________________<br>&gt; &gt; &gt; &gt;rules-users mailing list<br>&gt; &gt; &gt; &gt;rules-users@lists.jboss.org<br>&gt; &gt; &gt; &gt;<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt; &gt; &gt; &gt;&nbsp;&nbsp;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; --<br>&gt; &gt; &gt; Edson
 Tirelli<br>&gt; &gt; &gt; Software Engineer - JBoss Rules Core Developer<br>&gt; &gt; &gt; Office: +55 11 3124-6000<br>&gt; &gt; &gt; Mobile: +55 11 9218-4151<br>&gt; &gt; &gt; JBoss, a division of Red Hat @ <a target="_blank" href="http://www.jboss.com">www.jboss.com</a> <br>&gt; &lt;<a target="_blank" href="http://www.jboss.com">http://www.jboss.com</a>&gt; &lt;<a target="_blank" href="http://www.jboss.com">http://www.jboss.com</a>&gt;<br>&gt; &gt; &lt;<a target="_blank" href="http://www.jboss.com">http://www.jboss.com</a>&gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; _______________________________________________<br>&gt; &gt; &gt; rules-users mailing list<br>&gt; &gt; &gt; rules-users@lists.jboss.org<br>&gt; &gt; &gt; <a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt; &gt; &gt;<br>&gt; &gt; <br>&gt;
 &gt;------------------------------------------------------------------------<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;_______________________________________________<br>&gt; &gt; &gt;rules-users mailing list<br>&gt; &gt; &gt;rules-users@lists.jboss.org<br>&gt; &gt; &gt;<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt; &gt; &gt;&nbsp;&nbsp;<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; --<br>&gt; &gt; Edson Tirelli<br>&gt; &gt; Software Engineer - JBoss Rules Core Developer<br>&gt; &gt; Office: +55 11 3124-6000<br>&gt; &gt; Mobile: +55 11 9218-4151<br>&gt; &gt; JBoss, a division of Red Hat @ <a target="_blank" href="http://www.jboss.com">www.jboss.com</a> &lt;<a target="_blank" href="http://www.jboss.com">http://www.jboss.com</a>&gt; <br>&gt; &lt;<a target="_blank" href="http://www.jboss.com">http://www.jboss.com</a>&gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;
 _______________________________________________<br>&gt; &gt; rules-users mailing list<br>&gt; &gt; rules-users@lists.jboss.org<br>&gt; &gt; <a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt; &gt;<br>&gt; &gt;------------------------------------------------------------------------<br>&gt; &gt;<br>&gt; &gt;_______________________________________________<br>&gt; &gt;rules-users mailing list<br>&gt; &gt;rules-users@lists.jboss.org<br>&gt; &gt;<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt; &gt;&nbsp;&nbsp;<br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt; -- <br>&gt; Edson Tirelli<br>&gt; Software Engineer - JBoss Rules Core Developer<br>&gt; Office: +55 11 3124-6000<br>&gt; Mobile: +55 11 9218-4151<br>&gt; JBoss, a division of Red Hat @ <a target="_blank" href="http://www.jboss.com">www.jboss.com</a>
 &lt;<a target="_blank" href="http://www.jboss.com">http://www.jboss.com</a>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; rules-users mailing list<br>&gt; rules-users@lists.jboss.org<br>&gt; <a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;<br>&gt;------------------------------------------------------------------------<br>&gt;<br>&gt;_______________________________________________<br>&gt;rules-users mailing list<br>&gt;rules-users@lists.jboss.org<br>&gt;<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;&nbsp;&nbsp;<br>&gt;<br><br><br>-- <br> Edson Tirelli<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3124-6000<br> Mobile: +55 11 9218-4151<br> JBoss, a division of Red Hat @ <a target="_blank"
 href="http://www.jboss.com">www.jboss.com</a><br><br><br>_______________________________________________<br>rules-users mailing list<br>rules-users@lists.jboss.org<br><a target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></div></div><br></div></div></body></html>