Purpose of Prepare()?

What is the purpose of the Prepare() of the Action Scripts. It seems to me
that it’s just another check before any action occurs. So why not have just
two parts, a Condition and a Commit? Is there any special abilities that
Prepare() has?

-Phil

It’s logic split.
In general case any ScripAction should work on any transaction so in
prepare block you prepare Action, for example: SendMail action prepare
recipients lists and if it’s empty it’s return false(RT stop processing).
Our local scrips depends on CFs and in prepare code I check whether them
exist or not. Or Scrip make sence only under 'Create|Priority-Change’
transaction, check it in prepare.

Commit code does action, all objects are loaded and code only finalize
things.
Ruslan.

Philip Shon wrote: