def METHOD_NAME(self, my_task):
    # Events attached to the main task might occur
    my_task._sync_children(self.outputs, state=TaskState.MAYBE)
    # The main child's state is based on this task's state
    state = TaskState.FUTURE if my_task._is_definite() else my_task.state
    for child in my_task.children:
        if not isinstance(child.task_spec, BoundaryEvent):
            child._set_state(state)