<div><br></div> I suggest you use this as a base for your implementation, as I think it will help you:<div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="https://github.com/droolsjbpm/droolsjbpm/blob/master/drools-core/src/main/java/org/drools/base/accumulators/CollectSetAccumulateFunction.java">https://github.com/droolsjbpm/droolsjbpm/blob/master/drools-core/src/main/java/org/drools/base/accumulators/CollectSetAccumulateFunction.java</a></div>
<div><br></div><div><a href="https://github.com/droolsjbpm/droolsjbpm/blob/master/drools-core/src/main/java/org/drools/base/accumulators/CollectSetAccumulateFunction.java"></a> Edson<br><br><div class="gmail_quote">2011/1/26 groovenarula <span dir="ltr"><<a href="mailto:gnarula1@la-z-boy.com">gnarula1@la-z-boy.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Thanks Wolfgang. I found it. I Work on it and let you'll know how it goes.<br><br>Sent from my iPhone</div><div class="im"><div><br>On Jan 27, 2011, at 1:08 AM, "Wolfgang Laun-2 [via Drools - Java Rules Engine]" <<a href="http://user/SendEmail.jtp?type=node&node=2359225&i=0" rel="nofollow" target="_blank">[hidden email]</a>> wrote:<br>
<br></div><div></div></div><blockquote type="cite"><div><div class="im">
        
                
                Accumulate functions are very well documented in the Expert manual. Look for a section titled "Accumulate Functions".<br><br>You could also use accumulate with all the steps in inline code, which is documented in the preceding section.<br>
<br>-W<br><br><br><br></div><div class="gmail_quote"><div class="im">On 26 January 2011 16:50, groovenarula <span dir="ltr"><<a href="http://user/SendEmail.jtp?type=node&node=2356705&i=0&by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span> wrote:<br>
</div><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote"><div class="im">
<br>
Thanks for outlining the approach, Edson.<br>
<br>
Unfortunately, I'm a newbie using drools, so I just need some clarification<br>
on what you mean by 'matchAll is your own accumulate function with the<br>
semantics you described.' ? Do you mean that I have to create a 'custom'<br>
accumulate function ?<br>
<br>
Edson, if that's the case, then I'll try to search for example of creating a<br>
custom function. When I last searched, I did find an example on the<br>
Internet, however, I don't think I found details of how to make the function<br>
available to the rules engine (is it as simple as including the jar in the<br>
classpath or do I need to take addtional steps to use Matchall in drl ?)<br>
<br>
Can you please elaborate for the benefit of a noobie ?<br>
<br>
Thanks<br>
Gurvinder<br>
</div><font color="#888888"><div class="im"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/How-to-write-a-rule-that-fires-when-it-matches-against-specific-facts-in-working-memory-tp2294599p2354793.html?by-user=t&by-user=t" rel="nofollow" link="external" target="_blank"></a><a href="http://drools-java-rules-engine.46999.n3.nabble.com/How-to-write-a-rule-that-fires-when-it-matches-against-specific-facts-in-working-memory-tp2294599p2354793.html?by-user=t" rel="nofollow" link="external" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/How-to-write-a-rule-that-fires-when-it-matches-against-specific-facts-in-working-memory-tp2294599p2354793.html</a><br>
Sent from the Drools - User mailing list archive at <a href="http://Nabble.com" rel="nofollow" link="external" target="_blank">Nabble.com</a>.<br>
_______________________________________________<br>
rules-users mailing list<br>
</div><a href="http://user/SendEmail.jtp?type=node&node=2356705&i=1&by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a><div class="im"><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank"></a><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></font></blockquote></div><br>
<br>_______________________________________________
<br>rules-users mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=2356705&i=2&by-user=t" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><div class="im"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank"></a><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
        
        <br>
        <br>
        </div><hr noshade size="1" color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://drools-java-rules-engine.46999.n3.nabble.com/How-to-write-a-rule-that-fires-when-it-matches-against-specific-facts-in-working-memory-tp2294599p2356705.html?by-user=t" rel="nofollow" link="external" target="_blank"></a><a href="http://drools-java-rules-engine.46999.n3.nabble.com/How-to-write-a-rule-that-fires-when-it-matches-against-specific-facts-in-working-memory-tp2294599p2356705.html?by-user=t" rel="nofollow" link="external" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/How-to-write-a-rule-that-fires-when-it-matches-against-specific-facts-in-working-memory-tp2294599p2356705.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif">
                
                To unsubscribe from How to write a rule that fires when it matches against specific facts in working memory., <a href="http://drools-java-rules-engine.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2294599&code=Z25hcnVsYTFAbGEtei1ib3kuY29tfDIyOTQ1OTl8MjAzMTM1NDY2Mw==&by-user=t" rel="nofollow" link="external" target="_blank">click here</a>.
        </div></div></blockquote>
<br><hr align="left" width="300">
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/How-to-write-a-rule-that-fires-when-it-matches-against-specific-facts-in-working-memory-tp2294599p2359225.html" target="_blank">Re: How to write a rule that fires when it matches against specific facts in working memory.</a><div>
<div></div><div class="h5"><br>
Sent from the <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-User-f47000.html" target="_blank">Drools - User mailing list archive</a> at Nabble.com.<br>
</div></div><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>
<br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>