Allows the user to request a workflow action. This method must perform its own security checks.
00292 : ''' Allows the user to request a workflow action. This method must perform its own security checks. ''' sdef = self._getWorkflowStateOf(ob) if sdef is None: raise WorkflowException, 'Object is in an undefined state' if method_id not in sdef.transitions: raise Unauthorized tdef = self.transitions.get(method_id, None) if tdef is None or tdef.trigger_type != TRIGGER_WORKFLOW_METHOD: raise WorkflowException, ( 'Transition %s is not triggered by a workflow method' % method_id) if not self._checkTransitionGuard(tdef, ob): raise Unauthorized res = apply(func, args, kw) try: self._changeStateOf(ob, tdef) except ObjectDeleted: # Re-raise with a different result. raise ObjectDeleted(res) except ObjectMoved, ex: # Re-raise with a different result. raise ObjectMoved(ex.getNewObject(), res) return res security.declarePrivate('isInfoSupported') def isInfoSupported(self, ob, name):