--- 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)
--- 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)