Search in sources :

Example 1 with TaskStateRouter

use of io.seata.saga.engine.pcext.routers.TaskStateRouter in project seata by seata.

the class StateMachineProcessRouter method initDefaultStateRouters.

public void initDefaultStateRouters() {
    if (this.stateRouters.isEmpty()) {
        TaskStateRouter taskStateRouter = new TaskStateRouter();
        this.stateRouters.put(DomainConstants.STATE_TYPE_SERVICE_TASK, taskStateRouter);
        this.stateRouters.put(DomainConstants.STATE_TYPE_SCRIPT_TASK, taskStateRouter);
        this.stateRouters.put(DomainConstants.STATE_TYPE_CHOICE, taskStateRouter);
        this.stateRouters.put(DomainConstants.STATE_TYPE_COMPENSATION_TRIGGER, taskStateRouter);
        this.stateRouters.put(DomainConstants.STATE_TYPE_SUB_STATE_MACHINE, taskStateRouter);
        this.stateRouters.put(DomainConstants.STATE_TYPE_SUB_MACHINE_COMPENSATION, taskStateRouter);
        this.stateRouters.put(DomainConstants.STATE_TYPE_LOOP_START, taskStateRouter);
        this.stateRouters.put(DomainConstants.STATE_TYPE_SUCCEED, new EndStateRouter());
        this.stateRouters.put(DomainConstants.STATE_TYPE_FAIL, new EndStateRouter());
    }
}
Also used : TaskStateRouter(io.seata.saga.engine.pcext.routers.TaskStateRouter) EndStateRouter(io.seata.saga.engine.pcext.routers.EndStateRouter)

Aggregations

EndStateRouter (io.seata.saga.engine.pcext.routers.EndStateRouter)1 TaskStateRouter (io.seata.saga.engine.pcext.routers.TaskStateRouter)1