--- a/entities/wfobjs.py Tue Dec 08 10:58:56 2009 +0100
+++ b/entities/wfobjs.py Tue Dec 08 11:12:42 2009 +0100
@@ -146,8 +146,8 @@
requiredgroups, conditions, **kwargs)
if hasattr(subworkflow, 'eid'):
subworkflow = subworkflow.eid
- assert _cw.req.execute('SET T subworkflow WF WHERE WF eid %(wf)s,T eid %(t)s',
- {'t': tr.eid, 'wf': subworkflow}, ('wf', 't'))
+ assert self._cw.execute('SET T subworkflow WF WHERE WF eid %(wf)s,T eid %(t)s',
+ {'t': tr.eid, 'wf': subworkflow}, ('wf', 't'))
for fromstate, tostate in exitpoints:
tr.add_exit_point(fromstate, tostate)
return tr
@@ -464,9 +464,9 @@
kwargs['comment_format'] = commentformat
kwargs['wf_info_for'] = self
if treid is not None:
- kwargs['by_transition'] = self.req.entity_from_eid(treid)
+ kwargs['by_transition'] = self._cw.entity_from_eid(treid)
if tseid is not None:
- kwargs['to_state'] = self.req.entity_from_eid(tseid)
+ kwargs['to_state'] = self._cw.entity_from_eid(tseid)
return self._cw.create_entity('TrInfo', **kwargs)
def fire_transition(self, tr, comment=None, commentformat=None):