<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BR class="khtml-block-placeholder"></DIV>Mark,<DIV><BR class="khtml-block-placeholder"></DIV><DIV> I'v been trying to get the way to patch that, but I must confess that is way too complex for me now.. My best</DIV><DIV>guess is that when the update(retract/insert) is done, it just take the factHandle modified to rebuild the ReteRuleBase</DIV><DIV>so when the activations are setted in place this doesnt care about another fact update to fill the AgendaGroupImpl.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> I dont really know the best way to modify the code... I bow before u guys... </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> Also tried your suggestion using something like : modify ( cheese ) { price = 25, quality = premium }</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> But I get compilation erros saying that "modify(myFact) is not defined"... so I dont really know how to use</DIV><DIV>this MVEL functionality... got ur "what is new in drools 4.0", search at examples and mailing-list, but cant get the right way</DIV><DIV>to make that work.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> If you could help me with any working example, or maybe a work-around... I sont wanna use a set of rules that must be writen in a</DIV><DIV>sequence mode using salience.... I need to write a lot of rules in an independent way. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Sorry for my english, and thank you very much.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On 28-06-2007, at 16:43, Mark Proctor wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"> feel free to work on a patch for us and let us know what you come up with.<BR> <BR> Mark<BR> Felipe Piccolini wrote: <BLOCKQUOTE cite="mid:FF1320A9-B34D-4FBD-A9C2-4D840DCEFC16@bluesoft.cl" type="cite"> <DIV style="margin: 0px;">Mark,</DIV> <DIV style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;"> What about my previous mail where I report an issue with update using dynamic JavaBeans (using propertyListeners)?</DIV> <DIV style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">The problem is that when the engine is fired again from an propertyListener the evaluations on conditions (seems to me)</DIV> <DIV style="margin: 0px;">dont take the new state of the Facts changed in the set<Attribute> call.</DIV> <DIV style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">I will try using MVEL modify, but thats not the better solution, because the feature of propertyListerners inside javaBeans let</DIV> <DIV style="margin: 0px;">me write my rules in a cleaner way from BRMS/bussines editor.</DIV> <DIV style="margin: 0px; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">Thanks.</DIV> <DIV><BR class="khtml-block-placeholder"> </DIV> <BR> <DIV> <DIV>On 28-06-2007, at 8:28, Mark Proctor wrote:</DIV> <BR class="Apple-interchange-newline"> <BLOCKQUOTE type="cite"> <DIV style="margin: 0px;">If it can be done cleanly I'm not averse to it. however there is something else...</DIV> <DIV style="margin: 0px;">In the new MVEL dialect you no longer need propertychangelisteners if you don't want to call update()</DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">modify ( cheese ) { price = 25, quality = premium }</DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">This will modify all the setters and notify the engine at the end of the block setter. Is that good enough for you?</DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">Mark</DIV> <DIV style="margin: 0px;">Yuri de Wit wrote:</DIV> <BLOCKQUOTE type="cite"> <DIV style="margin: 0px;">Mark,</DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">btw, If this is a feature that makes sense from Drools pov I wouldnt</DIV> <DIV style="margin: 0px;">mind giving a shot at implementing it and contributing it back to</DIV> <DIV style="margin: 0px;">Drools.</DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">-- yuri</DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">On 6/28/07, Yuri de Wit <<A moz-do-not-send="true" href="mailto:ydewit@gmail.com">ydewit@gmail.com</A>> wrote:</DIV> <BLOCKQUOTE type="cite"> <DIV style="margin: 0px;">Sure. The solution I am taking right now is dont use dynamic</DIV> <DIV style="margin: 0px;">properties, which is not optimal (depending on the problem property</DIV> <DIV style="margin: 0px;">changes not being batched defeats the purpose of dynamic beans).</DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">The bottom line is that I was hoping that this feature would (1)</DIV> <DIV style="margin: 0px;">either already be taken care of in 4.0 or (2) become a feature request</DIV> <DIV style="margin: 0px;">for future releases.</DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">-- yuri</DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">On 6/28/07, Mark Proctor <<A moz-do-not-send="true" href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</A>> wrote:</DIV> <DIV style="margin: 0px;">> No we don't do anything to batch property change listener results. But</DIV> <DIV style="margin: 0px;">> maybe you can do this yourself.</DIV> <DIV style="margin: 0px;">> instead of calling modify, add it to a transaction list (that you make</DIV> <DIV style="margin: 0px;">> available in the current context). Then at the end of the consequence</DIV> <DIV style="margin: 0px;">> you can iterate that list and call modify on each object. Or</DIV> <DIV style="margin: 0px;">> alternatively don't use dynamic properties.</DIV> <DIV style="margin: 0px;">></DIV> <DIV style="margin: 0px;">> Mark</DIV> <DIV style="margin: 0px;">> Yuri de Wit wrote:</DIV> <DIV style="margin: 0px;">> > I am not talking about assert, but modify. I have a dynamic fact</DIV> <DIV style="margin: 0px;">> > already asserted but now I need to perform N changes on N different</DIV> <DIV style="margin: 0px;">> > properties on the same object on the same consequence. Drools is going</DIV> <DIV style="margin: 0px;">> > to traverse the RETE network N times once for each time the</DIV> <DIV style="margin: 0px;">> > PropertiesListener is called (each setProperty called).</DIV> <DIV style="margin: 0px;">> ></DIV> <DIV style="margin: 0px;">> > -- yuri</DIV> <DIV style="margin: 0px;">> ></DIV> <DIV style="margin: 0px;">> > On 6/28/07, Mark Proctor <<A moz-do-not-send="true" href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</A>> wrote:</DIV> <DIV style="margin: 0px;">> >> Why would doing the assert work at the end of the consequence be any</DIV> <DIV style="margin: 0px;">> >> quicker than doing it during the consequence?</DIV> <DIV style="margin: 0px;">> >></DIV> <DIV style="margin: 0px;">> >> Mark</DIV> <DIV style="margin: 0px;">> >> Yuri de Wit wrote:</DIV> <DIV style="margin: 0px;">> >> > I noticed that changes performed on facts asserted dynamically causes</DIV> <DIV style="margin: 0px;">> >> > the fact to be modified right away and therefore triggering a RETE</DIV> <DIV style="margin: 0px;">> >> > network traversal and rule schedulings.</DIV> <DIV style="margin: 0px;">> >> ></DIV> <DIV style="margin: 0px;">> >> > For apps with a large number of facts this could be a significant</DIV> <DIV style="margin: 0px;">> >> > scalability problem. At least in my case, I would like to be able to</DIV> <DIV style="margin: 0px;">> >> > use dynamic facts and perform any number of updates and have those</DIV> <DIV style="margin: 0px;">> >> > updates commited to working memory only when the rule consequence is</DIV> <DIV style="margin: 0px;">> >> > completed.</DIV> <DIV style="margin: 0px;">> >> ></DIV> <DIV style="margin: 0px;">> >> > Looking at the code, it seems that it would not be a major effort to</DIV> <DIV style="margin: 0px;">> >> > collect the facts received by the ReteooWorkingMemory.propertyChange</DIV> <DIV style="margin: 0px;">> >> > and perform the actual modifyObject() only when the consequence</DIV> <DIV style="margin: 0px;">> >> > evaluation is actually completed.</DIV> <DIV style="margin: 0px;">> >> ></DIV> <DIV style="margin: 0px;">> >> > Does that makes sense? Or are there side effects I am not seeing? Is</DIV> <DIV style="margin: 0px;">> >> > this a problem that 4.0 already resolves?</DIV> <DIV style="margin: 0px;">> >> ></DIV> <DIV style="margin: 0px;">> >> > thanks in advance,</DIV> <DIV style="margin: 0px;">> >> ></DIV> <DIV style="margin: 0px;">> >> > -- yuri</DIV> <DIV style="margin: 0px;">> >> > _______________________________________________</DIV> <DIV style="margin: 0px;">> >> > rules-users mailing list</DIV> <DIV style="margin: 0px;">> >> > <A moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></DIV> <DIV style="margin: 0px;">> >> > <A moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A></DIV> <DIV style="margin: 0px;">> >> ></DIV> <DIV style="margin: 0px;">> >></DIV> <DIV style="margin: 0px;">> >> _______________________________________________</DIV> <DIV style="margin: 0px;">> >> rules-users mailing list</DIV> <DIV style="margin: 0px;">> >> <A moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></DIV> <DIV style="margin: 0px;">> >> <A moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A></DIV> <DIV style="margin: 0px;">> >></DIV> <DIV style="margin: 0px;">> > _______________________________________________</DIV> <DIV style="margin: 0px;">> > rules-users mailing list</DIV> <DIV style="margin: 0px;">> > <A moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></DIV> <DIV style="margin: 0px;">> > <A moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A></DIV> <DIV style="margin: 0px;">> ></DIV> <DIV style="margin: 0px;">></DIV> <DIV style="margin: 0px;">> _______________________________________________</DIV> <DIV style="margin: 0px;">> rules-users mailing list</DIV> <DIV style="margin: 0px;">> <A moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></DIV> <DIV style="margin: 0px;">> <A moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A></DIV> <DIV style="margin: 0px;">></DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> </BLOCKQUOTE> <DIV style="margin: 0px;">_______________________________________________</DIV> <DIV style="margin: 0px;">rules-users mailing list</DIV> <DIV style="margin: 0px;"><A moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></DIV> <DIV style="margin: 0px;"><A moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A></DIV> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> </BLOCKQUOTE> <DIV style="margin: 0px; min-height: 14px;"><BR> </DIV> <DIV style="margin: 0px;">_______________________________________________</DIV> <DIV style="margin: 0px;">rules-users mailing list</DIV> <DIV style="margin: 0px;"><A moz-do-not-send="true" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></DIV> <DIV style="margin: 0px;"><A moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A></DIV> </BLOCKQUOTE> </DIV> <BR> <DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"> <DIV><SPAN class="Apple-style-span" style="text-decoration: underline;"><SPAN class="Apple-style-span" style=""> </SPAN></SPAN> <DIV><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;"><B style="font-size: 13px; font-weight: bold;"><SPAN class="Apple-style-span" style="font-size: 13px; font-weight: bold;">Felipe Piccolini M.</SPAN></B></SPAN></FONT></DIV> <DIV><A moz-do-not-send="true" href="mailto:felipe.piccolini@bluesoft.cl"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238);">felipe.piccolini@bluesoft.cl</SPAN></A></DIV> <BR class="khtml-block-placeholder"> </DIV> <DIV><BR class="khtml-block-placeholder"> </DIV> <BR class="Apple-interchange-newline"> </SPAN> </DIV> <BR> <PRE wrap=""><HR size="4" width="90%">_______________________________________________
rules-users mailing list
<A class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A>
<A class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A>
</PRE></BLOCKQUOTE> <BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">rules-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><SPAN class="Apple-style-span" style="text-decoration: underline;; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="-khtml-text-decorations-in-effect: underline; "> </SPAN></SPAN><DIV><FONT class="Apple-style-span" size="3"><SPAN class="Apple-style-span" style="font-size: 13px;"><B style="font-size: 13px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-size: 13px; font-weight: bold; ">Felipe Piccolini M.</SPAN></B></SPAN></FONT></DIV><DIV><A href="mailto:felipe.piccolini@bluesoft.cl"><SPAN class="Apple-style-span" style="color: rgb(0, 0, 238); -khtml-text-decorations-in-effect: underline; ">felipe.piccolini@bluesoft.cl</SPAN></A></DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>