Update docs

- Relates to #194
This commit is contained in:
Janne Valkealahti
2016-04-25 09:00:14 +01:00
parent d781aac80f
commit 63e266e4b9
3 changed files with 66 additions and 0 deletions

View File

@@ -753,6 +753,54 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
}
// end::snippetU[]
// tag::snippetUU[]
@Configuration
@EnableStateMachine
static class Config21 extends StateMachineConfigurerAdapter<String, String> {
@Override
public void configure(StateMachineStateConfigurer<String, String> states)
throws Exception {
states
.withStates()
.initial("S1")
.state("S2")
.state("S3")
.and()
.withStates()
.parent("S2")
.initial("S21")
.entry("S2ENTRY")
.exit("S2EXIT")
.state("S22");
}
@Override
public void configure(StateMachineTransitionConfigurer<String, String> transitions)
throws Exception {
transitions
.withExternal()
.source("S1").target("S2")
.event("E1")
.and()
.withExternal()
.source("S1").target("S2ENTRY")
.event("ENTRY")
.and()
.withExternal()
.source("S22").target("S2EXIT")
.event("EXIT")
.and()
.withEntry()
.source("S2ENTRY").target("S22")
.and()
.withExit()
.source("S2EXIT").target("S3");
}
}
// end::snippetUU[]
@Configuration
@EnableStateMachine
public class Config16