[Zope-CMF] DcworkFlow swallows second parameter to ObjectMoved
Robert Rottermann
robert@redcor.ch
Wed, 4 Sep 2002 17:37:44 +0200
Hello,
I am trying to move an object during a transaction.
in the transaction script I raise ObjectMoved(neobj, "url to the new
object") exception.
However this second parameter gets swallowed later on when ObjectMoved is
rerisen.
This happens in DcWorkFlow._executeTransition
I am using the version from CVS
the code is:
# Execute the "after" script.
if tdef is not None and tdef.after_script_name:
script = self.scripts[tdef.after_script_name]
# Pass lots of info to the script in a single parameter.
sci = StateChangeInfo(
ob, self, status, tdef, old_sdef, new_sdef, kwargs)
try:
script(sci) # May throw an exception.
except ObjectMoved, ex:
ob = ex.getNewObject()
moved = 1
# Don't re-raise
# Return the new state object.
if moved:
# Re-raise.
raise ObjectMoved(ob) <--------------- here it gets lost
else:
return new_sdef
This seems to be an error, or did I missunderstand something?
mit freundlichen Grüssen
Robert Rottermann
Wir wollen Technik mit Menschlichkeit verbinden,
um Menschen mit Technik zu erreichen.
www.redcor.ch - die website
www.redcor.net - zope trainings (and more)