| 101 | |
| 102 | |
| 103 | class StartEventJoin(Join, BpmnTaskSpec): |
| 104 | |
| 105 | def __init__(self, wf_spec, name, **kwargs): |
| 106 | super().__init__(wf_spec, name, **kwargs) |
| 107 | |
| 108 | def _check_threshold_structured(self, my_task): |
| 109 | |
| 110 | split_task = my_task.find_ancestor(self.split_task) |
| 111 | if split_task is None: |
| 112 | raise WorkflowException(f'Split at {self.split_task} was not reached', task_spec=self) |
| 113 | |
| 114 | may_fire, waiting = False, [] |
| 115 | for task in split_task.children: |
| 116 | if task.state == TaskState.COMPLETED: |
| 117 | may_fire = True |
| 118 | else: |
| 119 | waiting.append(task) |
| 120 | |
| 121 | return may_fire, waiting |
| 122 | |
| 123 | |
| 124 | class _EndJoin(UnstructuredJoin, BpmnTaskSpec): |