2 Replies Latest reply on Oct 23, 2012 10:37 PM by Jasmine Lee-Oracle

Using warning events in combination with temporal reasoning

OPA settings and environment settings

OPA version
10.3.0.77

OPA Project properties
Rule language: Dutch
Region: Netherlands (Dutch)

We are using temporal reasoning to make decisions. Example: 'Decision X' is initially 'uncertain', from 01-01-2012 'true' and from 31-12-2012 'uncertain'.

Now we want to use an warning event in case Decision X is uncertain between a certain relevant period, for example between 01-01-2012 and 31-03-2012.

something like

warning("decision could not be made") if
decision is uncertain between 01-01-2012 and 31-03-2012

Is this possible?
In case it isn't possible, is there another solution for this problem?

Thanks in advance.
• 1. Re: Using warning events in combination with temporal reasoning
For the purpose of this explanation, 'Decision X' is 'the person is happy'. Here's an idea to try...

Create a regular rule which checks whether 'the person is happy' is uncertain at any point in the specified interval:

the warning message should be triggered if
IntervalSometimes(2012-01-01, 2012-03-31, it is uncertain whether or not the person is happy)

Then create a Warning event rule, e.g.

Warning("Decision could not be made.") if
the warning message should be triggered

You could combine these two rules into one rule, but it will be easier to test if you add an intermediate attribute, e.g. something like 'the warning message should be triggered' I used above.

For more information about the IntervalSometimes function, search on "IntervalSometimes" in the OPM Help.

Cheers,
Jasmine
1 person found this helpful
• 2. Re: Using warning events in combination with temporal reasoning
I wasn't sure from your question whether Decision X had to be uncertain for the entire interval or just some part of the interval, so here are descriptions of two functions to consider:

IntervalAlways(<start-date>, <end-date>, <condition>)
Returns true if and only if a boolean condition is true at all times in the interval from the start date (inclusive) to the end date (exclusive).

IntervalSometimes(<start-date>, <end-date>, <condition>)
Returns true if and only if a boolean condition is ever true in the interval from the start date (inclusive) to the end date (exclusive).

Cheers,
Jasmine