The author gets paid (by slyfox (!)) according to the number of rules ;-)
-W

On 6 October 2011 10:24, Swindells, Thomas <[email protected]> wrote:
> For an even less technical solution you could have a person with a big stick 
> standing behind the users...
> I think what we are all wondering is why you want to limit the number of 
> rules!
>
> Thomas
>
>> -----Original Message-----
>> From: [email protected] [mailto:rules-users-
>> [email protected]] On Behalf Of Wolfgang Laun
>> Sent: 06 October 2011 08:14
>> To: Rules Users List
>> Subject: Re: [rules-users] rule limit
>>
>> On 6 October 2011 01:09, Davide Sottara <[email protected]> wrote:
>> > As far as I know, the parser does not check the number of rules in a
>> > DRL Maybe you could do something like this:
>> >
>> > (i) use a KnowledgeBuilder to load the DRL resource;
>> > (ii) before you add the packages to the knowledgeBase, iterate over
>> > kBuilder.getKnowledgePackages() to find the package generated from
>> > your DRL;
>> > (iii) use getRules().size() on the package to check if the number of
>> > rules exceeds your desired threshold
>>
>> This would limit the number of rules per package and not per DRL file.
>>
>> Crude and not foolproof,  but very cheap is a bash oneliner:
>>      LIMIT=10; PATH=some.drl; if [ $(grep '^\s*rule\>' $PATH | wc -l) -gt 
>> $LIMIT
>> ]; then echo more than $LIMIT rules in $PATH; fi
>>
>> -W
>>
>>
>> >
>> > D.
>> >
>> >
>> > --
>> > View this message in context:
>> > http://drools.46999.n3.nabble.com/rules-users-rule-limit-tp3394660p339
>> > 8277.html Sent from the Drools: User forum mailing list archive at
>> > Nabble.com.
>> > _______________________________________________
>> > rules-users mailing list
>> > [email protected]
>> > https://lists.jboss.org/mailman/listinfo/rules-users
>> >
>> _______________________________________________
>> rules-users mailing list
>> [email protected]
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> **************************************************************************************
> This message is confidential and intended only for the addressee. If you have 
> received this message in error, please immediately notify the 
> [email protected] and delete it from your system as well as any copies. The 
> content of e-mails as well as traffic data may be monitored by NDS for 
> employment and security purposes. To protect the environment please do not 
> print this e-mail unless necessary.
>
> NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 
> 4EX, United Kingdom. A company registered in England and Wales. Registered 
> no. 3080780. VAT no. GB 603 8808 40-00
> **************************************************************************************
>
> _______________________________________________
> rules-users mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users
>

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to