[rt-users] Purpose of Prepare()?
Ruslan U. Zakirov
cubic at acronis.ru
Mon Jul 12 12:57:05 EDT 2004
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:
> 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
More information about the rt-users
mailing list