Update docs

- Add manual repo config example
  for showcase.
- Relates to #270
This commit is contained in:
Janne Valkealahti
2016-11-24 08:03:26 +00:00
parent d3de91dfc2
commit 3b7bb8139d
3 changed files with 157 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -2228,6 +2228,9 @@ image::images/sm-repository-simplemachine.png[scaledwidth="100%", title="SimpleM
[[image-sm-repository-simplesubmachine]]
image::images/sm-repository-simplesubmachine.png[scaledwidth="100%", title="SimpleSubMachine"]
[[image-sm-repository-showcasemachine]]
image::images/sm-repository-showcasemachine.png[scaledwidth="100%", title="ShowcaseMachine"]
[[sm-repository-jpa]]
=== JPA
Actual _Repository_ implementations for a _JPA_ are
@@ -2253,6 +2256,37 @@ This is equivalent to machine shown in
include::samples/DocsJpaRepositorySampleTests1.java[tags=snippetB]
----
This is equivalent to machine shown in
<<image-sm-repository-showcasemachine>>.
First you access all repositories.
[source,java,indent=0]
----
include::samples/DocsJpaRepositorySampleTests1.java[tags=snippetC1]
----
Create actions and guards.
[source,java,indent=0]
----
include::samples/DocsJpaRepositorySampleTests1.java[tags=snippetC2]
----
Create states.
[source,java,indent=0]
----
include::samples/DocsJpaRepositorySampleTests1.java[tags=snippetC3]
----
Finally create transitions.
[source,java,indent=0]
----
include::samples/DocsJpaRepositorySampleTests1.java[tags=snippetC4]
----
Complete example can be found from sample
<<statemachine-examples-datajpa>>. This example is also showing how
repository can be pre-populated from existing _json_ file having a