Example usage for org.springframework.statemachine.config.model DefaultStateMachineModel DefaultStateMachineModel

List of usage examples for org.springframework.statemachine.config.model DefaultStateMachineModel DefaultStateMachineModel

Introduction

In this page you can find the example usage for org.springframework.statemachine.config.model DefaultStateMachineModel DefaultStateMachineModel.

Prototype

public DefaultStateMachineModel(ConfigurationData<S, E> configurationData, StatesData<S, E> statesData,
        TransitionsData<S, E> transitionsData) 

Source Link

Document

Instantiates a new default state machine model.

Usage

From source file:org.springframework.statemachine.config.AbstractStateMachineFactory.java

protected StateMachineModel<S, E> resolveStateMachineModel(String machineId) {
    if (stateMachineModelFactory == null) {
        return defaultStateMachineModel;
    } else {/*from w  w w . j a v  a 2  s. com*/
        StateMachineModel<S, E> m = stateMachineModelFactory.build(machineId);
        if (m.getConfigurationData() == null) {
            // if model doesn't have explicit configuration data,
            // get it from default model
            return new DefaultStateMachineModel<>(defaultStateMachineModel.getConfigurationData(),
                    m.getStatesData(), m.getTransitionsData());
        } else {
            return m;
        }
    }
}