Пример #1
0
    def process_event(cls, workflow_state, event):
        if isinstance(event, events.WorkflowExecutionEvent):
            cls.process_workflow_event(workflow_state, event)
            return

        if isinstance(event, events.TaskExecutionEvent):
            cls.process_task_event(workflow_state, event)
            return

        raise exc.InvalidEventType(type(event), event.name)
Пример #2
0
    def process_event(cls, conductor, task_flow_entry, event):
        if isinstance(event, events.WorkflowExecutionEvent):
            cls.process_workflow_event(conductor, task_flow_entry, event)
            return

        if isinstance(event, events.ActionExecutionEvent):
            cls.process_action_event(conductor, task_flow_entry, event)
            return

        if isinstance(event, events.EngineOperationEvent):
            cls.process_action_event(conductor, task_flow_entry, event)
            return

        raise exc.InvalidEventType(type(event), event.name)
Пример #3
0
    def process_event(cls, workflow_state, task_state, event):
        if isinstance(event, events.WorkflowExecutionEvent):
            cls.process_workflow_event(workflow_state, task_state, event)
            return

        if isinstance(event, events.TaskItemActionExecutionEvent):
            cls.process_task_item_event(workflow_state, task_state, event)
            return

        if isinstance(event, events.ActionExecutionEvent):
            cls.process_action_event(workflow_state, task_state, event)
            return

        if isinstance(event, events.EngineOperationEvent):
            cls.process_action_event(workflow_state, task_state, event)
            return

        raise exc.InvalidEventType(type(event), event.name)