Overriding rules?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Overriding rules?

Post by Rem »

Is there some way to override one rule with another?

I have ten different rules which checks for certain times and makes calculations when modifying or creating a BO. Now I would like all of these to be overrided with a singel other rule if some conditions are true.

In old fashioned programming it would look like this:

start
If singelcondition is true goto singelrule
Rule1
Rule2
...
Rule10

:singelrule
Singlerule
end

But how do I do this in Aware? The only thing I can think of is to include the singlecondition in everyone of the ten rules ans thus making them not true. This seems a bit redundant to me. Isn´t there any other way?

/Rem
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Rem,

perhaps using rule priority settings?

Tom
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Rem,

You can also set a yes/no attribute in your BO & use that in your various rules. Let's say the attribute is BO.Override.

Rules 1-10 may include a condition of BO.Override='No' while Rule 11 may include a condition of BO.Override='Yes'. You would have a rule to set BO.Override to 'Yes' or 'No' depending on the various conditions.

Make sense?

Tom
Rem
Posts: 216
Joined: Wed Oct 03, 2007 8:58 am
Location: Sweden
Contact:

Post by Rem »

No, sorry, getting tired now.

But this means modifying every one of the ten rules, right?

/Rem
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Rem,

Yes, it means simply putting 1 more condition line in each rule + adding one new rule to the set the flag.

Tom
Post Reply