Add repository config actions

- Add action to RepositoryTransition, state/entry/exit
  actions to RepositoryState.
- New ActionsRepository.
- Relates to #262
This commit is contained in:
Janne Valkealahti
2016-10-02 14:42:12 +01:00
parent de556f0d54
commit 0b6f67ece4
12 changed files with 466 additions and 13 deletions

View File

@@ -2,17 +2,35 @@
{
"_class": "org.springframework.statemachine.data.jpa.JpaRepositoryState",
"initial": true,
"state": "S1"
"state": "S1",
"exitActions": [
{
"_class": "org.springframework.statemachine.data.jpa.JpaRepositoryAction",
"spel": "T(System).out.println('hello exit S1')"
}
]
},
{
"_class": "org.springframework.statemachine.data.jpa.JpaRepositoryState",
"initial": false,
"state": "S2"
"state": "S2",
"entryActions": [
{
"_class": "org.springframework.statemachine.data.jpa.JpaRepositoryAction",
"spel": "T(System).out.println('hello entry S2')"
}
]
},
{
"_class": "org.springframework.statemachine.data.jpa.JpaRepositoryState",
"initial": false,
"state": "S3"
"state": "S3",
"stateActions": [
{
"_class": "org.springframework.statemachine.data.jpa.JpaRepositoryAction",
"spel": "T(System).out.println('hello state S3')"
}
]
},
{
"_class": "org.springframework.statemachine.data.jpa.JpaRepositoryTransition",
@@ -24,6 +42,12 @@
"_class": "org.springframework.statemachine.data.jpa.JpaRepositoryTransition",
"source": "S2",
"target": "S3",
"event": "E2"
"event": "E2",
"actions": [
{
"_class": "org.springframework.statemachine.data.jpa.JpaRepositoryAction",
"spel": "T(System).out.println('hello')"
}
]
}
]