Add initial action to repository config
- Now RepositoryState can have initial action if it is an initial state. - Implement all needed tests. - Fixes #281
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"@id": "1",
|
||||
"_class": "org.springframework.statemachine.data.redis.RedisRepositoryAction",
|
||||
"spel": "extendedState.variables.put('foo', 0)"
|
||||
},
|
||||
{
|
||||
"@id": "2",
|
||||
"_class": "org.springframework.statemachine.data.redis.RedisRepositoryState",
|
||||
"initial": true,
|
||||
"initialAction" : "1",
|
||||
"state": "S1"
|
||||
},
|
||||
{
|
||||
"@id": "3",
|
||||
"_class": "org.springframework.statemachine.data.redis.RedisRepositoryState",
|
||||
"initial": false,
|
||||
"state": "S2"
|
||||
},
|
||||
{
|
||||
"_class": "org.springframework.statemachine.data.redis.RedisRepositoryTransition",
|
||||
"source": "2",
|
||||
"target": "3",
|
||||
"event": "E1",
|
||||
"kind": "EXTERNAL"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user