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

def DCWorkflow::DCWorkflow::DCWorkflowDefinition::getInfoFor (   self,
  ob,
  name,
  default 
)

Allows the user to request information provided by the
workflow.  This method must perform its own security checks.

Definition at line 333 of file DCWorkflow.py.

00333                                            :
        '''
        Allows the user to request information provided by the
        workflow.  This method must perform its own security checks.
        '''
        if name == self.state_var:
            return self._getWorkflowStateOf(ob, 1)
        vdef = self.variables[name]
        if vdef.info_guard is not None and not vdef.info_guard.check(
            getSecurityManager(), self, ob):
            return default
        status = self._getStatusOf(ob)
        if status is not None and status.has_key(name):
            value = status[name]

        # Not set yet.  Use a default.
        elif vdef.default_expr is not None:
            ec = createExprContext(StateChangeInfo(ob, self, status))
            value = vdef.default_expr(ec)
        else:
            value = vdef.default_value

        return value

    security.declarePrivate('notifyCreated')
    def notifyCreated(self, ob):


Generated by  Doxygen 1.6.0   Back to index