Race condition with rules?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All:

I've got a rule where a script is run for each incoming mail message. I
have a following rule that adds a category to the mail message based on who
the message comes from.

My problem is that the rule that adds the category to the mail message
seems to undo the changes made to the mail message in the script.

My script basically adds a property to the mail message the calls the Save
method to save the changes. I've traced into this script and all works fine.
But, as soon as the other rule runs the changes are gone..

Is there some sort of race condition between these rules? Are the two rules
saving the message so close together that one overwrites the other?

Thanks for any help
-- Peter
http://www.PeterRitchie.com/
 
It's best not to have both code and rules that act on the same message.
Better to combine them into one code procedure.
 
Sue:

Thanks for the response.

If my script processes every message I should forget about any other rules?
Wow, that's very limiting. I'd have to re-write all he logic that the rules
sub-system provides for the various other rules that have been created.

Ouch.

Since Outlook does nothing to limit/warn the user in the creation of
run-a-script rules with the existence of other rules, I consider this a bug.
The interface is implying a feature, and that feature doesn't work.

Anyway, thanks for the suggestion.

-- Peter
http://peterRitchie.com/
 
Hi Sue:

I've tried using the NewMailEx event to process incoming mail via script
instead of through a Run-A-Script rule.

Initially, this seems to be working much better. I'll see how it goes in
the long run...

-- Peter
http://www.peterRitchie.com/
 
Back
Top