package click.kamil.examples.statemachine.inheritancestate;

import org.springframework.statemachine.config.configurers.ExternalTransitionConfigurer;
import org.springframework.statemachine.config.configurers.StateConfigurer;

class OneStateMachineConfiguration extends AbstractOneStateMachineConfiguration {
    @Override
    protected void addAdditionalStates(StateConfigurer<States, Events> states) {
        states.state(States.STATE_EXTRA_1);
    }

    @Override
    protected void addAdditionalTransitions(ExternalTransitionConfigurer<States, Events> transitions) throws Exception {
        transitions
                .and()
                .withExternal().event(Events.EVENTX)
                .source(States.STATE5)
                .target(States.STATE_EXTRA_1);
    }
}
