org.springframework.statemachine.config.builders.StateMachineConfigurationConfigurer Java Examples

The following examples show how to use org.springframework.statemachine.config.builders.StateMachineConfigurationConfigurer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StateMachineConfiguration.java    From spring-cloud-skipper with Apache License 2.0 6 votes vote down vote up
@Override
public void configure(StateMachineConfigurationConfigurer<SkipperStates, SkipperEvents> config) throws Exception {
	config
		.withConfiguration()
			.taskExecutor(skipperStateMachineTaskExecutor)
			// this is to simply add logging for state enters
			.listener(new StateMachineListenerAdapter<SkipperStates, SkipperEvents>() {
				@Override
				public void stateEntered(State<SkipperStates, SkipperEvents> state) {
					log.info("Entering state {}", state);
				}
			})
			.transitionConflictPolicy(TransitionConflictPolicy.PARENT)
		.and()
		.withPersistence()
			.runtimePersister(stateMachineRuntimePersister);
}
 
Example #2
Source File: StateMachineConfig.java    From spring-boot-tutorial with Creative Commons Attribution Share Alike 4.0 International 5 votes vote down vote up
@Override
  public void configure(StateMachineConfigurationConfigurer<States, Events> config) throws Exception {
      // @formatter:off
config
	.withConfiguration()
	.autoStartup(true)
	.listener(listener());
// @formatter:on
  }
 
Example #3
Source File: StatemachineConfigurer.java    From tools-journey with Apache License 2.0 5 votes vote down vote up
@Override
public void configure(StateMachineConfigurationConfigurer<TurnstileStates, TurnstileEvents> config)
        throws Exception {
    config.withConfiguration()
            .machineId("turnstileStateMachine")
    ;
}
 
Example #4
Source File: ForkJoinStateMachineConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Override
public void configure(StateMachineConfigurationConfigurer<String, String> config)
        throws Exception {
    config
            .withConfiguration()
            .autoStartup(true)
            .listener(new StateMachineListener());
}
 
Example #5
Source File: HierarchicalStateMachineConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Override
public void configure(StateMachineConfigurationConfigurer<String, String> config)
        throws Exception {
    config
            .withConfiguration()
            .autoStartup(true)
            .listener(new StateMachineListener());
}
 
Example #6
Source File: SimpleStateMachineConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Override
public void configure(StateMachineConfigurationConfigurer<String, String> config) throws Exception {
    config
      .withConfiguration()
      .autoStartup(true)
      .listener(new StateMachineListener());
}
 
Example #7
Source File: JunctionStateMachineConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Override
public void configure(StateMachineConfigurationConfigurer<String, String> config)
        throws Exception {
    config
            .withConfiguration()
            .autoStartup(true)
            .listener(new StateMachineListener());
}
 
Example #8
Source File: SimpleEnumStateMachineConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Override
public void configure(StateMachineConfigurationConfigurer<ApplicationReviewStates, ApplicationReviewEvents> config)
        throws Exception {
    config
            .withConfiguration()
            .autoStartup(true)
            .listener(new StateMachineListener());
}