<span id="goog_1264873486784"></span><span id="goog_1264873486785"></span><a href="/"></a>On Sat, Jan 30, 2010 at 6:56 PM, kashif10 <<a href="mailto:kash452@yahoo.com">kash452@yahoo.com</a>> wrote:<br>><br>> Thanks edson for you nice advise.<br>
> It really reduce the memory uage from 400 mb 70 mb..<br>><br>> compareDiagnosis( valueName[0] in ("Heart Failure") ||<br>> (valueCode[0] in<br>> ("402.01","402.11","402.91","402.01","402.03","402.11","402.13","402.91","402.93",<br>
> "428.0 - 428.9") , valueCodeSystem[0] == "2.16.840.1.113883.6.2" ) )<br>><br>><br>> Here I have some questions.<br>><br>> i) we have to iterate whole valueName not only [0]. How we can do it.<br>
<br>Check out<br>
<br>
<a href="http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#RuleLanguage-ConditionalElements">http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#RuleLanguage-ConditionalElements</a><br>
<br>in <a id="d0e4795">4.8.2.8. Conditional Element "from", which is one way of avoiding the potentially evil next().<br><br>Also, consider creating fact objects, from your original data, which are better suited for writing rules.<br>
<br><br></a>> ii) we have not only simple valueCode matching, we can have<br>> a) Range in code such as 428.0 - 428.9, so any thing in WM having<br>> valueCode b/w this range should match.<br>> b) but we can't use simply numbers , we have to use String as we can have<br>
> code having alphabet such as "V32.4"<br>> c) we can have wild card usage too. e.g code in Rule can be "V2*" which<br>> can be match any thing at the place opf asterik in WM valuCodes.<br>
<br>Same chapter of the documentation, see the "matches" operator in section <font size="2"><a id="d0e4100">4.8.2.1.1.3.1. Operators</a></font><br><br>-W<br><br>><br>> I see that Rule engine do introspection & call get methods of the fields &<br>
> can do simple condition maching like ==, <, >etc. But mostly we have some<br>> complex logic in matching like I told you in pt ii) of valuecode matching.<br>> I think only sol is to call methods which will comes inside eval() & If we<br>
> start usig it for long rules. rules will never load & stuck :(...<br>><br>> Need your expet advise for those long & complex rules.<br>><br>> Thanks<br>><br>><br>> --<br>> View this message in context: <a href="http://n3.nabble.com/Weblogic-rules-to-Drools-rules-tp126265p178895.html">http://n3.nabble.com/Weblogic-rules-to-Drools-rules-tp126265p178895.html</a><br>
> Sent from the Drools - User 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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>><br><br>