<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Michael,<div><br></div><div>ThankYou for your speedy feedback.</div><div><br></div><div>Is it possible to count the number of fact types in a drl if not in a Guided decision table editor ?<br><br>--- On <b>Sat, 9/3/11, Michael Anstis <i>&lt;michael.anstis@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Michael Anstis &lt;michael.anstis@gmail.com&gt;<br>Subject: Re: [rules-users] How to count number of facts of a type in memory?<br>To: "Rules Users List" &lt;rules-users@lists.jboss.org&gt;<br>Date: Saturday, September 3, 2011, 11:27 AM<br><br><div id="yiv1502056320">It is not possible with the web guided decision table at this stage as you need to use "collect" as you rightly suspect.<br><br>We have numerous improvements to complete to make the web editor more
 powerful.<br><br>
<div class="yiv1502056320gmail_quote">2011/9/3 puja nandamuri <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:med_9501@yahoo.com" target="_blank" href="/mc/compose?to=med_9501@yahoo.com">med_9501@yahoo.com</a>&gt;</span><br><blockquote class="yiv1502056320gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font:inherit;" valign="top">Hi,<div><br></div><div>How can I count the number of facts of a partilcuar type inserted into the rules session?</div><div>
<br></div><div>lets say, I insert several instances of fact called Asset into the rules session.</div><div><br></div><div>I need to write a web guided decision table that outputs a specifc text value in an action column based on the number of assets in memory.</div>
<div><br></div><div><br></div><div><br></div><div>numberofAssets &nbsp; &nbsp; &nbsp;result</div><div><br></div><div>1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;result1</div><div>2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;result2</div><div>3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp;result3</div><div><br></div><div>How can I create a condition column that counts the number of Assets in memory ?</div><div><br></div><div><br></div><div><br></div><div>question2:</div><div><br></div><div>If I want to write a drl &nbsp;that needs to count number of Assets in memory and print that value, can I use a collect from or is it only used with a Collection ?</div>
<div><br></div><div>As always ,</div><div><br></div><div>&nbsp;Thank You all for your fast responses and ideas.</div><div><br></div><div>Thanks,</div><div><br></div><div>Ram</div></td></tr></tbody></table><br>_______________________________________________<br>

rules-users mailing list<br>
<a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>rules-users mailing list<br><a ymailto="mailto:rules-users@lists.jboss.org" href="/mc/compose?to=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></div></blockquote></div></td></tr></table>