[rules-users] How to count number of facts of a type in memory?

Michael Anstis michael.anstis at gmail.com
Sat Sep 3 14:27:12 EDT 2011


It is not possible with the web guided decision table at this stage as you
need to use "collect" as you rightly suspect.

We have numerous improvements to complete to make the web editor more
powerful.

2011/9/3 puja nandamuri <med_9501 at yahoo.com>

> Hi,
>
> How can I count the number of facts of a partilcuar type inserted into the
> rules session?
>
> lets say, I insert several instances of fact called Asset into the rules
> session.
>
> 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.
>
>
>
> numberofAssets      result
>
> 1                            result1
> 2                            result2
> 3                            result3
>
> How can I create a condition column that counts the number of Assets in
> memory ?
>
>
>
> question2:
>
> If I want to write a drl  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 ?
>
> As always ,
>
>  Thank You all for your fast responses and ideas.
>
> Thanks,
>
> Ram
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110903/5eb37103/attachment.html 


More information about the rules-users mailing list