Updates to docs

This commit is contained in:
Janne Valkealahti
2015-05-29 10:59:47 +01:00
parent 2df44abc53
commit 61ec8723df
12 changed files with 644 additions and 39 deletions

View File

@@ -41,24 +41,24 @@ public class Application {
throws Exception {
transitions
.withExternal()
.source(States.WASHING)
.target(States.RINSING)
.source(States.WASHING).target(States.RINSING)
.event(Events.RINSE)
.and()
.withExternal()
.source(States.RINSING)
.target(States.DRYING)
.source(States.RINSING).target(States.DRYING)
.event(Events.DRY)
.and()
.withExternal()
.source(States.RUNNING)
.target(States.POWEROFF)
.source(States.RUNNING) .target(States.POWEROFF)
.event(Events.CUTPOWER)
.and()
.withExternal()
.source(States.POWEROFF)
.target(States.HISTORY)
.event(Events.RESTOREPOWER);
.source(States.POWEROFF).target(States.HISTORY)
.event(Events.RESTOREPOWER)
.and()
.withExternal()
.source(States.RUNNING).target(States.END)
.event(Events.STOP);
}
//end::snippetAB[]
@@ -74,7 +74,7 @@ public class Application {
//tag::snippetC[]
public static enum Events {
RINSE, DRY,
RINSE, DRY, STOP,
RESTOREPOWER, CUTPOWER
}
//end::snippetC[]

View File

@@ -1,27 +1,29 @@
+----------------------------------------------------------------------------------+
| |
+----------------------------------------------------------------------------------+
| |
| +--------------------------------------------------------------------+ |
| *-->| RUNNING |-->X |
| +--------------------------------------------------------------------+ |
| | | |
| | +-------------+ +-------------+ +-------------+ | |
| | *-->| WASHING | RINSE | RINSING | DRY | DRYING | | |
| | | |------>| |------>| | | |
| | | | | | | | | |
| | +-------------+ +-------------+ +-------------+ | |
| | | |
| | H | |
| | ^ | |
| +------------|-------------------------------------------------------+ |
| | | |
| |RESTOREPOWER |CUTPOWER |
| | | |
| +-------------+ | |
| | POWEROFF | | |
| | |<----------+ |
| | | |
| +-------------+ |
| |
+----------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------+
| |
+--------------------------------------------------------------------------------------+
| |
| +--------------------------------------------------------------------+ STOP |
| *-->| RUNNING |------>X |
| +--------------------------------------------------------------------+ |
| | | |
| | +-------------+ +-------------+ +-------------+ | |
| | *-->| WASHING | RINSE | RINSING | DRY | DRYING | | |
| | | |------>| |------>| | | |
| | | | | | | | | |
| | +-------------+ +-------------+ +-------------+ | |
| | | |
| | +-------+ | |
| | |HISTORY| | |
| | +-------+ | |
| | ^ | |
| +------------|-------------------------------------------------------+ |
| | | |
| |RESTOREPOWER |CUTPOWER |
| | | |
| +-------------+ | |
| | POWEROFF | | |
| | |<----------+ |
| | | |
| +-------------+ |
| |
+--------------------------------------------------------------------------------------+