Scot Loach | 18 Aug 2004 22:38
Favicon

question about conditions

Is this list still the appropriate place to ask questions about PCIM?  If not, is there a more appropriate
place to ask?

I need to be able to define rules that have conditions that are based on some other condition happening at a
certain rate.

For example, if I have a rule:

if <C1> then <A1>

I'd like to be able to have a rule like this:

if <C1 was true 5 times in the past hour> then <A2>

I'd like to be able to do this with existing (standard) conditions, so using a base class is not an option.
Also, I'd like the "5 times in the past hour" restriction to be reusable, so I can apply it to a number of conditions.

The only way I can think of to accomplish this is to define a new class PolicyConditionRate, which inherits
from Policy and contains
an Interval and Threshold properties, and define a new dependency association between a PolicyCondition
and a PolicyConditionRate.

Any comments on this?  Is there a better way to accomplish this?

Gmane