entities/wfobjs.py
branchstable
changeset 3687 859f7d741bfb
parent 3663 c74d8ec4cdb2
child 3695 4dd26ca635ed
child 3696 e0d53bb59611
equal deleted inserted replaced
3685:6f807804f1d0 3687:859f7d741bfb
   442         kwargs = {}
   442         kwargs = {}
   443         if comment is not None:
   443         if comment is not None:
   444             kwargs['comment'] = comment
   444             kwargs['comment'] = comment
   445             if commentformat is not None:
   445             if commentformat is not None:
   446                 kwargs['comment_format'] = commentformat
   446                 kwargs['comment_format'] = commentformat
   447         args = [('wf_info_for', 'E')]
   447         kwargs['wf_info_for'] = self
   448         kwargs['E'] = self.eid
       
   449         if treid is not None:
   448         if treid is not None:
   450             args.append( ('by_transition', 'T') )
   449             kwargs['by_transition'] = self.req.entity_from_eid(treid)
   451             kwargs['T'] = treid
       
   452         if tseid is not None:
   450         if tseid is not None:
   453             args.append( ('to_state', 'S') )
   451             kwargs['to_state'] = self.req.entity_from_eid(tseid)
   454             kwargs['S'] = tseid
       
   455         return self.req.create_entity('TrInfo', *args, **kwargs)
   452         return self.req.create_entity('TrInfo', *args, **kwargs)
   456 
   453 
   457     def fire_transition(self, tr, comment=None, commentformat=None):
   454     def fire_transition(self, tr, comment=None, commentformat=None):
   458         """change the entity's state by firing transition of the given name in
   455         """change the entity's state by firing transition of the given name in
   459         entity's workflow
   456         entity's workflow