# HG changeset patch # User Aurelien Campeas # Date 1254904879 -7200 # Node ID 28547f21308ee689f6dad1772e9f633c02ca8b15 # Parent 669854258b90ecc47ed9bdfcce145efafeb8ba1e two bits of docstring diff -r 669854258b90 -r 28547f21308e entities/wfobjs.py --- a/entities/wfobjs.py Wed Oct 07 10:33:24 2009 +0200 +++ b/entities/wfobjs.py Wed Oct 07 10:41:19 2009 +0200 @@ -137,7 +137,7 @@ return tr def add_wftransition(self, name, subworkflow, fromstates, exitpoints, - requiredgroups=(), conditions=(), **kwargs): + requiredgroups=(), conditions=(), **kwargs): """add a workflow transition to this workflow""" tr = self._add_transition('WorkflowTransition', name, fromstates, requiredgroups, conditions, **kwargs) diff -r 669854258b90 -r 28547f21308e server/migractions.py --- a/server/migractions.py Wed Oct 07 10:33:24 2009 +0200 +++ b/server/migractions.py Wed Oct 07 10:41:19 2009 +0200 @@ -966,6 +966,21 @@ def cmd_add_workflow(self, name, wfof, default=True, commit=False, **kwargs): + """ + create a new workflow and links it to entity types + :type name: unicode + :param name: name of the workflow + + :type wfof: string or list/tuple of strings + :param wfof: entity type(s) having this workflow + + :type default: bool + :param default: tells wether this is the default workflow + for the specified entity type(s); set it to false in + the case of a subworkflow + + :rtype: `Workflow` + """ self.session.set_pool() # ensure pool is set wf = self.cmd_create_entity('Workflow', name=unicode(name), **kwargs)