Document region changes

- Add new docs for regions changes related to StateMachineContext
  and StateConfigurer.
- Document new datajpamultipersist sample.
- Fixes #621
This commit is contained in:
Janne Valkealahti
2019-01-20 13:55:24 +00:00
parent d698fc8d11
commit 4feeb196cf
10 changed files with 157 additions and 2 deletions

View File

@@ -631,6 +631,38 @@ public class DocsConfigurationSampleTests extends AbstractStateMachineTests {
}
// end::snippetP[]
// tag::snippetPP[]
@Configuration
@EnableStateMachine
public class Config10RegionId
extends EnumStateMachineConfigurerAdapter<States2, Events> {
@Override
public void configure(StateMachineStateConfigurer<States2, Events> states)
throws Exception {
states
.withStates()
.initial(States2.S1)
.state(States2.S2)
.and()
.withStates()
.parent(States2.S2)
.region("R1")
.initial(States2.S2I)
.state(States2.S21)
.end(States2.S2F)
.and()
.withStates()
.parent(States2.S2)
.region("R2")
.initial(States2.S3I)
.state(States2.S31)
.end(States2.S3F);
}
}
// end::snippetPP[]
// tag::snippetQ[]
@Configuration
@EnableStateMachine