Commit Graph

348 Commits

Author SHA1 Message Date
Janne Valkealahti
e60cf77a04 TimerTrigger with delay fires immediately
- Fix use of correct delay.
- Move CountTrigger to support package
  as it's a generic class.
- Fixes #220
2016-05-04 19:48:05 +01:00
Janne Valkealahti
9c4524e1cb Complex linked pseudostates cause trouble
- Fix complex linked state handling.
- Fixes #217
2016-05-04 07:33:25 +01:00
Janne Valkealahti
84197d6ce5 Add tests
- Failed attempt to find failing tests for #216
  but then we can't ever have enought tests so
  stashing ongoing work here.
2016-05-01 19:27:30 +01:00
Janne Valkealahti
e7c28c2353 Add spel support for uml
- Now Guards and Actions can be defined
  as expressions if 'spel' language is used.
- Fixes #215
2016-05-01 15:35:50 +01:00
Janne Valkealahti
3cf40e8220 Add uml tests for showcase 2016-05-01 10:31:09 +01:00
Janne Valkealahti
f7419d2c7d Support initial action in uml
- Add action detection from initial state
  vertex which then translates into initial state
  initial action.
- Fixes #213
2016-04-30 16:16:19 +01:00
Janne Valkealahti
b0b21a4feb Don't publish build-tests
- Fixes #211
2016-04-30 10:16:25 +01:00
Janne Valkealahti
a74e82a8f9 Fix missing guards in uml model
- Add defined guards to normal transitions.
- Fixes #212
2016-04-30 09:22:27 +01:00
Janne Valkealahti
ca6a0c10aa Update changelog 2016-04-25 09:11:45 +01:00
Janne Valkealahti
63e266e4b9 Update docs
- Relates to #194
2016-04-25 09:00:14 +01:00
Janne Valkealahti
d781aac80f Add new deploy sample
- Fixes #209
2016-04-25 08:34:46 +01:00
Janne Valkealahti
8c0b95d679 Fix uml loading
- Now copying model into tmp file if it's not available
  as a physical file.
- Fixes #210
2016-04-25 07:51:24 +01:00
Janne Valkealahti
347e1d7095 Fix state exit
- Fix case where linked pseudostates may cause
  substate not exited properly.
- Tests coming in other commit.
- Fixes #208
2016-04-24 17:38:20 +01:00
Janne Valkealahti
debc50cb56 Add support for timers in uml
- Can now use timers based on TimeEvent, TimeExpression
  and LiteralInteger.
- Fixes #207
2016-04-23 09:46:37 +01:00
Janne Valkealahti
149d9e17b3 Update docs
- Relates to #194
2016-04-22 18:22:43 +01:00
Janne Valkealahti
06f839fb71 Guard should not break with Throwable
- Now catching all exceptions and throwables
  with evaluate and return false in those cases.
- Fixes #206
2016-04-22 15:04:23 +01:00
Janne Valkealahti
3d41bef524 Update docs
- Relates to #194
2016-04-22 13:35:38 +01:00
Janne Valkealahti
1adca702f6 Add support for default history state
- Add mechanism for transition into a default
  state vertex in cases where i.e. substate has
  never been entered, thus meaning there is no
  history. Without default vertex, submachine now
  does default entry logic to that region.
- Fixes #204
2016-04-22 07:46:17 +01:00
Janne Valkealahti
9339f6c742 Add new annotated method tests
- Relates to #197
2016-04-20 08:39:20 +01:00
Janne Valkealahti
50d32c2c26 Add new tests for Choice exit
- New test for choice exit scenario which
  I thought was broken.
- Add new spring-statemachine-build-tests project to
  ease testing so that we can mix everything. This
  project is a topdog which can depend on all other
  modules.
- Relates to #203
2016-04-19 19:20:06 +01:00
Janne Valkealahti
510a796288 Support transition type in uml
- Fixes #202
2016-04-17 18:08:01 +01:00
Janne Valkealahti
b1c06b7d5d Support event deferring in uml
- Fixes #201
2016-04-17 17:32:51 +01:00
Janne Valkealahti
711910e3db Polish 2016-04-17 16:58:52 +01:00
Janne Valkealahti
9bf9d6cdfb Support resource loader in UmlStateMachineModelFactory
- Fixes #200
2016-04-17 16:10:44 +01:00
Janne Valkealahti
519d3e9029 Update docs
- Relates to #194
2016-04-17 15:47:46 +01:00
Janne Valkealahti
a4a4a28faf Support FunctionBehavior for actions
- Fixes #199
2016-04-17 15:24:40 +01:00
Janne Valkealahti
8cbb9c1e37 Update docs
- Fix typo
- Relates to #194
2016-04-16 18:32:09 +01:00
Janne Valkealahti
0e79fe5ca2 Update docs
- Add section for junction state.
- Relates to #194
2016-04-16 18:26:55 +01:00
Janne Valkealahti
12ef87b692 Add junction state support for uml model
- Relates to #193
2016-04-16 17:18:08 +01:00
Janne Valkealahti
49b158d3c6 Add support for junction pseudostate
- Pretty much as choice as difference is more or less academic but
  needed for uml model.
- Fixes #42
2016-04-16 16:46:00 +01:00
Janne Valkealahti
5165221d84 Add history state support for uml model
- Relates to #193
2016-04-16 15:36:26 +01:00
Janne Valkealahti
7938086c46 Add fork and join state support for uml model
- Also add creation of an anonymous transition
- Relates to #193
2016-04-16 14:50:31 +01:00
Janne Valkealahti
78391822a9 Add choice state support for uml model
- Relates to #193
2016-04-16 12:24:58 +01:00
Janne Valkealahti
3c7edd433e Add support for linked choice states
- With linked choices a machine got stuck in a pseudostate
  while it should automatically follow the links till
  non-pseudostate reached.
- Add ChoicePseudoState to use holder as state references
  may not be known at a time of its instantiation.
- Fixes #195
2016-04-16 09:50:26 +01:00
Janne Valkealahti
4e7b3eb66b Add new persist tests
- New tests related to persist/restore for
  a ssm id.
- Relates to #198
2016-04-15 15:37:49 +01:00
Janne Valkealahti
b5da16ac82 Update docs
- Relates to #194
2016-04-10 15:53:42 +01:00
Janne Valkealahti
cb7005b445 Add entry/exit points support for uml model
- Relates to #193
2016-04-10 14:59:11 +01:00
Janne Valkealahti
6f2e90f320 Add final state support for uml model
- Relates to #193
2016-04-10 10:00:50 +01:00
Janne Valkealahti
313fe954cb Add root regions support for uml model
- Now multiple root regions works via uml model.
- Relates to #193
2016-04-09 17:58:47 +01:00
Janne Valkealahti
ba1729c928 Add base support for exit/entry points
- New concepts of using exit and entry points
  to transition between sub-states.
- Add hooks to annotation config model.
- Relates to #192
2016-04-09 16:38:41 +01:00
Janne Valkealahti
51145f1368 Add base support for eclipse papyrus modeling
- First stage to add support for UI modeling via
  eclipse uml2 and papyrus frameworks.
- Add new interface StateMachineModelFactory which is
  a central point of building machines models outside
  of a normal annotation/build classes. What this mean is
  a hook to config model so that machine can be defined
  via a model factory, instead of writing config based on
  normal adapter callbacks.
- Integrate model config into an annotation model so that
  you can still use normal adapters but point those to
  model factory classes, which then allows external hooks
  for machine configuration.
- New spring-statemachine-uml package which supports
  eclipse uml2/emf frameworks to define a machine config.
- Relates to #193
2016-04-09 16:04:16 +01:00
Janne Valkealahti
6cce27e30b Add distibuted action
- New module spring-statemachine-cluster which is
  based on spring-cloud-cluster to provide leader
  election.
- Ensemble now has a concept of a leader if implementation
  supports it.
- New DistributedLeaderAction can use leader info to execute
  action only on a leader.
- Tweak web sample with these new concepts.
- Fixes #176
2016-03-28 10:44:48 +01:00
Janne Valkealahti
89d183f91c Fix state entry called too many times
- Fix double entry in a case that target is initial state
  and source is target's direct parent.
- Fixes #191
2016-03-27 16:54:57 +01:00
Janne Valkealahti
c61507cae6 Fix end state handling
- State is now properly reported even if
  state machine is stopped due to it terminating
  via end state.
- Submachine is now explicitly stopped when parent
  is moving its state into end state.
- Fixed some persistense issues handling along these fixes.
- Fixes #190
2016-03-25 09:06:51 +00:00
Janne Valkealahti
1bf65760d5 Allow user to use machine id
- change original id to uuid.
- This new id is now for user disposal.
- Currently only meant for a top-level machine.
- Can be set via annotation config, model classes or via
  new StateMachineFactory.getStateMachine(String).
- Is persisted with DefaultStateMachinePersister and
  StateMachineContext.
- Related new tests in ConfigurationTests and StateMachinePersistTests3.
- Fixes #186
2016-03-24 07:54:36 +00:00
Janne Valkealahti
a82ff5b936 Fix history state reset
- Fixing a persist/restore bug which failed to properly
  reset history state via StateMachineContext history mappings.
- Effectively caused by too early `break` from a loop resetting
  states where history reset needs to check all states to find
  substate machines.
- Ported test given with a #188.
- Relates to #188
2016-03-22 12:07:18 +00:00
Janne Valkealahti
936be90bf4 Update changelog 2016-03-20 14:06:59 +00:00
Janne Valkealahti
05d4cf05f1 Fix zk ensemble join and start
- Now checking during a start if curator client is
  already started, if so handle join manually. Also
  trying to start client manually.
- Fixes #187
2016-03-20 14:04:28 +00:00
Janne Valkealahti
8ca21a10f2 Polish 2016-03-20 09:46:54 +00:00
Janne Valkealahti
5ec61f35d9 Polish 2016-03-20 09:46:08 +00:00