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

def DCWorkflow::DCWorkflow::DCWorkflowDefinition::getCatalogVariablesFor (   self,
  ob 
)

Allows this workflow to make workflow-specific variables
available to the catalog, making it possible to implement
worklists in a simple way.
Returns a mapping containing the catalog variables
that apply to ob.

Definition at line 141 of file DCWorkflow.py.

00141                                         :
        '''
        Allows this workflow to make workflow-specific variables
        available to the catalog, making it possible to implement
        worklists in a simple way.
        Returns a mapping containing the catalog variables
        that apply to ob.
        '''
        res = {}
        status = self._getStatusOf(ob)
        for id, vdef in self.variables.items():
            if vdef.for_catalog:
                if status.has_key(id):
                    value = status[id]

                # 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

                res[id] = value
        # Always provide the state variable.
        state_var = self.state_var
        res[state_var] = status.get(state_var, self.initial_state)
        return res

    security.declarePrivate('listObjectActions')
    def listObjectActions(self, info):


Generated by  Doxygen 1.6.0   Back to index