I have an UML diagram as below :

How to configure states and transitions in state machine from SI to END based on events....
public class Config14
extends EnumStateMachineConfigurerAdapter<States, Events> {
@Override
public void configure(StateMachineStateConfigurer<States, Events> states)
throws Exception {
.....
}
@Override
public void configure(StateMachineTransitionConfigurer<States, Events> transitions)
throws Exception {
.....
}
}