[Zope-CMF] DCWorkflow innards. Why does the default state not honour automatic transitions??
robert rottermann
robert@redcor.ch
Mon, 13 Jan 2003 18:57:28 +0100
Chris,
what version of DCWorkflow are u using?
my farly recent version has the following method, which prevents the exec=
ution=20
of any automatic transitions.
Thanks
Robert
def _changeStateOf(self, ob, tdef=3DNone, kwargs=3DNone):
'''
Changes state. Can execute multiple transitions if there are
automatic transitions. tdef set to None means the object
was just created. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ =
=20
~~~~~~~~~~~~^''
moved_exc =3D None
while 1:
try:
sdef =3D self._executeTransition(ob, tdef, kwargs)
except ObjectMoved, moved_exc:
ob =3D moved_exc.getNewObject()
sdef =3D self._getWorkflowStateOf(ob)
# Re-raise after all transitions.
if sdef is None:=20
break <--------------------------------------!!!!!!!!!!!
tdef =3D self._findAutomaticTransition(ob, sdef)
if tdef is None:
# No more automatic transitions.
break
# Else continue.
if moved_exc is not None:
# Re-raise.
raise moved_exc
Am Montag, 13. Januar 2003 12.53 schrieb Chris Withers:
> robert rottermann wrote:
> > Hi there,
> > when a DCWorkflow controlled object is created and thus set to its
> > initial state no automatic transitions are honoured.
>
> Works for me...
>
> cheers,
>
> Chris
>
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests