Example #1
0
 def _update_state_hook(self, my_task):
     context_task = my_task.workflow.get_task_spec_from_name(self.context)
     root_task = my_task.workflow.task_tree
     for task in root_task._find_any(context_task):
         if task.thread_id != my_task.thread_id:
             continue
         if not task._has_state(Task.COMPLETED):
             my_task._set_state(Task.WAITING)
             return False
     return TaskSpec._update_state_hook(self, my_task)
Example #2
0
 def _update_state_hook(self, my_task):
     context_task = my_task.workflow.get_task_spec_from_name(self.context)
     root_task    = my_task.workflow.task_tree
     for task in root_task._find_any(context_task):
         if task.thread_id != my_task.thread_id:
             continue
         if not task._has_state(Task.COMPLETED):
             my_task._set_state(Task.WAITING)
             return False
     return TaskSpec._update_state_hook(self, my_task)