<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>Hello
Zopers!</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>I'm currently writing a
script that adds some ExtFiles and then execute an external
method.</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>Here's the script
[Script1]:</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=184154209-23012004>
<DIV><SPAN class=184154209-23012004><FONT
face=Arial>context.data['0002']['folder1'].manage_addProduct['ExtFile'].manage_addExtFile(id='1',
title='file1', file=file1)<BR></FONT>
<DIV><SPAN class=184154209-23012004><FONT
face=Arial>context.data['0002']['folder1'].manage_addProduct['ExtFile'].manage_addExtFile(id='2',
title='file2', file=file2)<BR></FONT>
<DIV><SPAN class=184154209-23012004><FONT
face=Arial>context.data['0002']['folder1'].manage_addProduct['ExtFile'].manage_addExtFile(id='3',
title='file3', file=file3)</FONT></SPAN></DIV><SPAN
class=184154209-23012004></SPAN></SPAN></DIV><SPAN
class=184154209-23012004><SPAN
class=184154209-23012004></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><SPAN class=184154209-23012004><SPAN
class=184154209-23012004>
<DIV><FONT face=Arial></FONT><FONT face=Arial></FONT><FONT
face=Arial></FONT><FONT face=Arial></FONT><FONT face=Arial></FONT><BR><SPAN
class=184154209-23012004><FONT
face=Arial>context.runExternalMethod(params) </FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>return
'OK'</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>When the external method
causes NO errors, the Extfiles are made. But when the Extrenal method causes
</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>an error, zope shows up the
standard_error_message and the ExtFiles are not made.....</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>I then executed the script
from another script [Script2]:</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>try:</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>
context.Script1()</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>except:</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial> return
'ERROR'</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>else:</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial> return
'OK!'</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>When Script1 causes an
error (from the extrernal method) the extfiles are made. Zope shows
'ERROR'.</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>Why does this happen. When
I execute Script1 from Script2 without try-except the extfiles are not
made</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>when the script causes an
error... </FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>What must i add
to undo all actions made in Script1?</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>Thanks for the
support!</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=184154209-23012004><FONT face=Arial>Marco.</FONT></SPAN></DIV>
<DIV><SPAN class=184154209-23012004><FONT
face=Arial></FONT></SPAN> </DIV></SPAN></SPAN></DIV></SPAN></DIV></SPAN></BODY></HTML>