Logo Search packages:      
Sourcecode: zope-cmfworkflow version File versions

def DCWorkflow::DCWorkflow::DCWorkflowDefinition::_changeStateOf (   self,
  ob,
  tdef = None,
  kwargs = None 
) [private]

Changes state.  Can execute multiple transitions if there are
automatic transitions.  tdef set to None means the object
was just created.

Definition at line 428 of file DCWorkflow.py.

00428                                                         :
        '''
        Changes state.  Can execute multiple transitions if there are
        automatic transitions.  tdef set to None means the object
        was just created.
        '''
        moved = 0
        while 1:
            try:
                sdef = self._executeTransition(ob, tdef, kwargs)
            except ObjectMoved, ex:
                moved = 1
                ob = ex.getNewObject()
                sdef = self._getWorkflowStateOf(ob)
            if sdef is None:
                break
            tdef = self._findAutomaticTransition(ob, sdef)
            if tdef is None:
                # No more automatic transitions.
                break
            # Else continue.
        if moved:
            # Re-raise.
            raise ObjectMoved(ob)

    def _executeTransition(self, ob, tdef=None, kwargs=None):


Generated by  Doxygen 1.6.0   Back to index