[Rt-devel] Scrip execution order anomaly?

Ruediger Riediger ruediger.riediger at Sun.COM
Tue Nov 2 09:08:06 EST 2004


Hello RT gurus,

I have a strange scrip execution order anomaly in RT 3.0.12.
I already have read

http://wiki.bestpractical.com/index.cgi?ScripExecOrder

so I think the below is what I learned.

In a given Stage (here: TransactionCreate, as TransactionBatch does not 
work with this version of RT), I expect the scrips being executed in the 
following order [per scrip Prepare/Commit part, not per number]:

Condition Scrip #1
     return = undef -> stop
     return = 1     -> Prepare Scrip #1
                           return = undef -> stop
                           return = 1     -> remember #1
Condition Scrip #2
     return = undef -> stop
     return = 1     -> Prepare Scrip #2
                           return = undef -> stop
                           return = 1     -> remember #2
Condition Scrip #3
     return = undef -> stop
     return = 1     -> Prepare Scrip #3
                           return = undef -> stop
                           return = 1     -> remember #3

now run through all # remembered from above:

for i (remember)
{
     Commit #i
}

Again, the numbers are just labeles, there is no guarantee that #1 is 
executed before #2.

Now, this means that all Prepare scrips are done before the Commit 
scrips are run. If e.g. the priority of a ticket is changed in Prepare 
#3, the new priority should be there for Commit #1, #2, etc.

However, I found that this is not the case:

# Tue Nov 02 13:19:30 2004  	RT_System - Starts changed from Not set to 
Tue Nov 02 13:19:30 2004 	  	
# Tue Nov 02 13:19:31 2004  	RT_System - Due changed from Not set to Wed 
Nov 03 13:20:30 2004 	  	
# Tue Nov 02 13:19:32 2004  	RT_System - SLA Full service added 	  	
# Tue Nov 02 13:19:32 2004  	RT_System - State new added 	  	
# Tue Nov 02 13:19:33 2004  	RT_System - HowReported Email added 	  	
# Tue Nov 02 13:19:35 2004  	RT_System - Priority changed from 2 to 1

...although the priority change (last entry) is done in the Prepare 
phase while all other things are done in the Commit phase (and would 
yield other results if the priority would be 1, e.g. Due would be "Tue 
Nov 02 14:19:30 2004", the SLA would be different, etc.).

Can someone please provide me with some insight what goes wrong - and 
how to fix it? Thanks!

Best regards,

	Ruediger Riediger

-- 
Dr. Ruediger Riediger                              Sun Microsystems GmbH
NSG - SunCERT                                             Komturstr. 18a
mailto:Ruediger.Riediger at Sun.com                          D-12099 Berlin
------------------------------------------------------------------------
NOTICE:  This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
------------------------------------------------------------------------
PGP 2048RSA/0x2C5020E9          964C E189 0FF0 8882  2BAB 65E2 6912 1FF2
------------------------------------------------------------------------


More information about the Rt-devel mailing list