entities/wfobjs.py
changeset 10831 f1b5a5ea0da0
parent 10682 7e111b606005
equal deleted inserted replaced
10830:d41f13a919ff 10831:f1b5a5ea0da0
   549         in entity's workflow if this transition is possible
   549         in entity's workflow if this transition is possible
   550         """
   550         """
   551         tr = self._get_transition(tr)
   551         tr = self._get_transition(tr)
   552         if any(tr_ for tr_ in self.possible_transitions()
   552         if any(tr_ for tr_ in self.possible_transitions()
   553                if tr_.eid == tr.eid):
   553                if tr_.eid == tr.eid):
   554             self.fire_transition(tr)
   554             self.fire_transition(tr, comment, commentformat)
   555 
   555 
   556     def change_state(self, statename, comment=None, commentformat=None, tr=None):
   556     def change_state(self, statename, comment=None, commentformat=None, tr=None):
   557         """change the entity's state to the given state (name or entity) in
   557         """change the entity's state to the given state (name or entity) in
   558         entity's workflow. This method should only by used by manager to fix an
   558         entity's workflow. This method should only by used by manager to fix an
   559         entity's state when their is no matching transition, otherwise
   559         entity's state when their is no matching transition, otherwise