Add scope sample

- Tune docs for usage and sample.
- Fixes #137
This commit is contained in:
Janne Valkealahti
2015-12-13 11:13:33 +00:00
parent 8aaf66afea
commit 1b0ca6ebef
12 changed files with 280 additions and 13 deletions

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<logger name="org.springframework.statemachine" level="TRACE"/>
</configuration>

View File

@@ -0,0 +1,12 @@
+---------------------------------------------------+
| SM |
+---------------------------------------------------+
| |
| +--------+ A +--------+ B +--------+ |
| *-->| S0 |------>| S1 |------>| S2 | |
| +--------+ +--------+ +--------+ |
| ^ | |
| | C | |
| +----------------------------------+ |
| |
+---------------------------------------------------+

View File

@@ -0,0 +1,16 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Spring Statemachine Scope Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<p th:text="'States: ' + ${states}" />
<form action="#" data-th-action="@{/states}" data-th-object="${model}" method="post">
<button type="submit" name="event" value="A">Send A</button>
<button type="submit" name="event" value="B">Send B</button>
<button type="submit" name="event" value="C">Send C</button>
</form>
<pre th:text="${stateChartModel}"/>
</body>
</html>