[Zope-CMF] DCWorkflow innards. Why does the default state not honour automatic transitions??

Dieter Maurer dieter@handshake.de
Tue, 14 Jan 2003 20:39:55 +0100


robert rottermann wrote at 2003-1-13 18:57 +0100:
 > ...
 > my farly recent version has the following method, which prevents the execution 
 > of any automatic transitions.
You mix "tdef is None" with "self._getWorkfowStateOf(ob) is None"

The "None" transaction means "entering the initial state".
After you did this, "_getWorkflowStateOf" does not return "None"
but the initial state.
When it returns "None", no initial state is defined.

 > ...
 >     def _changeStateOf(self, ob, tdef=None, kwargs=None):
 >         '''
 >         Changes state.  Can execute multiple transitions if there are
 >         automatic transitions.  tdef set to None means the object
 >         was just created.         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~                
 >         ~~~~~~~~~~~~^''
 > ...
 >                 sdef = self._executeTransition(ob, tdef, kwargs)
 > ...
 >             if sdef is None: 
 >                 break <--------------------------------------!!!!!!!!!!!
 > ..


Dieter