<div>Yes Rete Tree is identical for both the structures. Will go with one of the scenarios given below , instead of going with Regex. </div>
<div> </div>
<div>rule "Test"<br>when<br>t : Thing( foo == "BAR" || == "BAS" );<br>then<br>System.out.println( "meh" );<br>end<br><br>rule "Test"<br>when<br>t : Thing( foo in("BAR","BAS") );<br>
then<br>System.out.println( "meh" );<br>end<br><br>Adding to my initial question , based on the condition satisfied how can I set a variable to "Y"in a different object (Other than customer)?customerDetail is not static.</div>
<div><br>rule "Age Factor"<br> when<br> m : Customer( age matches "18,21,33,28,40,41")<br> then <br> System.out.println("Customer falls in age group ");<br>
// doAgeTasks();</div>
<div> customerDetail.setFallsInAgeGroup("Y"); -- Need to do something like this.How can I do this?<br>end<br><br></div>
<div class="gmail_quote">On Tue, Nov 17, 2009 at 4:13 PM, Lindy hagan <span dir="ltr"><<a href="mailto:lindyhagan@gmail.com">lindyhagan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Thanks for the quick reply.Will look into regex.<br><br>
<div class="gmail_quote">2009/11/17 Mauricio Salatino <span dir="ltr"><<a href="mailto:salaboy@gmail.com" target="_blank">salaboy@gmail.com</a>></span>
<div>
<div></div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Or just find how to write a regex to match all that numbers:<br>Using matches and <a href="http://java.sun.com/docs/books/tutorial/essential/regex/" target="_blank">http://java.sun.com/docs/books/tutorial/essential/regex/</a>
<div>
<div></div>
<div><br><br>
<div class="gmail_quote">On Tue, Nov 17, 2009 at 6:50 PM, Mauricio Salatino <span dir="ltr"><<a href="mailto:salaboy@gmail.com" target="_blank">salaboy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">I think that you can do something like:<br><br>m : Customer( age == "18" || =="21" || =="33" || =="28" || =="40" || =="41")<br>
<br>
<div class="gmail_quote">2009/11/17 Lindy hagan <span dir="ltr"><<a href="mailto:lindyhagan@gmail.com" target="_blank">lindyhagan@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div></div>
<div><br>Need to do some tasks if customers age is in 18,21,33,28,40,41. Can't use contains as age is a string value.Could any one help me out. Below rule does not work.<br><br><br>rule "Age Factor"<br> when<br>
m : Customer( age matches "18,21,33,28,40,41")<br> then <br> System.out.println("Customer falls in age group ");<br> doAgeTasks();<br>end<br><br>Thanks,<br><font color="#888888">Lindy.<br>
</font><br></div></div>_______________________________________________<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>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>- <a href="http://salaboy.wordpress.com/" target="_blank">http://salaboy.wordpress.com</a><br>- <a href="http://www.jbug.com.ar/" target="_blank">http://www.jbug.com.ar</a><br>
- Salatino "Salaboy" Mauricio -<br></font></blockquote></div><br><br clear="all"><br>-- <br>- <a href="http://salaboy.wordpress.com/" target="_blank">http://salaboy.wordpress.com</a><br>- <a href="http://www.jbug.com.ar/" target="_blank">http://www.jbug.com.ar</a><br>
- Salatino "Salaboy" Mauricio -<br></div></div><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><br></blockquote></div></div></div><br></blockquote></div><br>