equal
deleted
inserted
replaced
264 try: |
264 try: |
265 return self.destination_state[0] |
265 return self.destination_state[0] |
266 except IndexError: |
266 except IndexError: |
267 return entity.latest_trinfo().previous_state |
267 return entity.latest_trinfo().previous_state |
268 |
268 |
|
269 def potential_destinations(self): |
|
270 try: |
|
271 yield self.destination_state[0] |
|
272 except IndexError: |
|
273 for state in self.reverse_allowed_transition: |
|
274 yield state |
269 |
275 |
270 def parent(self): |
276 def parent(self): |
271 return self.workflow |
277 return self.workflow |
272 |
278 |
273 |
279 |
277 |
283 |
278 @property |
284 @property |
279 def subwf(self): |
285 def subwf(self): |
280 return self.subworkflow[0] |
286 return self.subworkflow[0] |
281 |
287 |
282 def destination(self): |
288 def destination(self, entity): |
283 return self.subwf.initial |
289 return self.subwf.initial |
|
290 |
|
291 def potential_destinations(self): |
|
292 yield self.subwf.initial |
284 |
293 |
285 def add_exit_point(self, fromstate, tostate): |
294 def add_exit_point(self, fromstate, tostate): |
286 if hasattr(fromstate, 'eid'): |
295 if hasattr(fromstate, 'eid'): |
287 fromstate = fromstate.eid |
296 fromstate = fromstate.eid |
288 if tostate is None: |
297 if tostate is None: |