entities/wfobjs.py
branchstable
changeset 3609 9329f765fff3
parent 3582 28547f21308e
child 3621 1ec4452aa36f
equal deleted inserted replaced
3608:5a46e68c3d3c 3609:9329f765fff3
   141         """add a workflow transition to this workflow"""
   141         """add a workflow transition to this workflow"""
   142         tr = self._add_transition('WorkflowTransition', name, fromstates,
   142         tr = self._add_transition('WorkflowTransition', name, fromstates,
   143                                   requiredgroups, conditions, **kwargs)
   143                                   requiredgroups, conditions, **kwargs)
   144         if hasattr(subworkflow, 'eid'):
   144         if hasattr(subworkflow, 'eid'):
   145             subworkflow = subworkflow.eid
   145             subworkflow = subworkflow.eid
   146         self.req.execute('SET T subworkflow WF WHERE WF eid %(wf)s,T eid %(t)s',
   146         assert self.req.execute('SET T subworkflow WF WHERE WF eid %(wf)s,T eid %(t)s',
   147                          {'t': tr.eid, 'wf': subworkflow}, ('wf', 't'))
   147                                 {'t': tr.eid, 'wf': subworkflow}, ('wf', 't'))
   148         for fromstate, tostate in exitpoints:
   148         for fromstate, tostate in exitpoints:
   149             tr.add_exit_point(fromstate, tostate)
   149             tr.add_exit_point(fromstate, tostate)
   150         return tr
   150         return tr
   151 
   151 
   152 
   152