54 Commits

Author SHA1 Message Date
Janne Valkealahti
8b786bc8b9 URL Cleanup
- Merge/squash #689 #705 #711
2019-05-16 08:37:37 +01:00
Janne Valkealahti
3602130cc0 Add scope sample
- Backport #137 fixes #143
- Tune docs for usage and sample.
2015-12-13 14:48:28 +00:00
Janne Valkealahti
c981c5a6ee Update docs
- Remove most of a static class modifiers from docs
  to make things easier if doing copy/paste. Not
  all can be removed because some spring inner
  config classes has to be static.
- Fixes #123
2015-11-26 09:36:47 +00:00
Janne Valkealahti
07e6076e0b Polish samples logging
- Add logging of internal transitions which makes things
  a bit more clear with showcase sample.
- Update showcase docs with clarification of use of
  nested states.
2015-11-18 11:52:06 +00:00
Janne Valkealahti
a6f06435e1 Polish docs 2015-10-11 15:45:06 +01:00
Janne Valkealahti
af6f11a1b6 Align versions in samples 2015-09-08 15:26:31 +01:00
Janne Valkealahti
c26f3546e7 Update ref docs
- Update web sample.
- Add web statechart and update its dist screenshots
  to align changes in web sample.
- Add first version of zk dist article.
2015-08-21 18:36:23 +01:00
Janne Valkealahti
99275380c3 Tune tests, modify web sample, add more logging
- In web sample change other event C to K which brings
  machine back from S2 to S1.
- Add more logging.
- New test sending parallel events.
2015-08-21 12:59:41 +01:00
Janne Valkealahti
05f69070d8 Change TaskExecutor bean name
- Now using stateMachineTaskExecutor instead of taskExecutor
  so that it's easier to use custom executor and not to
  collide with bean created i.e. scheduling.
- Fixes #83
2015-08-09 09:53:46 +01:00
Janne Valkealahti
7fc7dd9cac Fix potential concurrency issue with join pseudostate
- Change notified flag to volatile which might explain
  some test failures.
- More testing tweaks for #76
2015-08-08 16:30:24 +01:00
Janne Valkealahti
7572a9ced3 Add extended state variables for web sample rest api 2015-08-07 17:49:49 +01:00
Janne Valkealahti
ba16830151 Remove extra debug logging 2015-08-07 17:28:48 +01:00
Janne Valkealahti
672a41ecf1 Add internal transition to web sample
- This is purely for jepsen tests, though also
  handy for UI for showing that variable can be changed.
  Essentially we want to have a way to set extended state
  variable via internal transition which takes an value from
  event headers and set that to extended state. This is then
  supposed to be used from jepsen to test concurrenty issues
  around extended state variables.
2015-08-07 17:26:02 +01:00
Janne Valkealahti
bba3b231b3 Synchronize Join PseudoState state machine listener
- Synchronize JoinPseudoState's
  JoinTracker.stateChanged(State<S, E>, State<S, E>) method
  for playing nice with concurrent region execution.
  Should fix #93.
- Tuning test which relates to #76. What comes for the
  tests, there was this concurrency issue and also problem
  in tests itself.
- Polish JoinPseudoState.
2015-08-07 14:38:49 +01:00
Janne Valkealahti
70455ed329 Add status to web sample rest api 2015-08-01 18:39:49 +01:00
Janne Valkealahti
48d6459c26 Add zookeeper web example
- This is a web based distributed zookeeper state machine
  sample showing how multiple Spring boot instances having
  a state machine can work with a zookeeper to distribute state
  handling thoughout a jvm boundaries.
- Also this example is using websocket support to have live
  updates of a UI for state machine state changes.
2015-07-31 18:29:06 +01:00
Janne Valkealahti
706f1de232 Update ref docs
- First set of changes for doc updates for M3
- Relates #88
2015-07-26 16:52:15 +01:00
Janne Valkealahti
15c6e507d8 Tweak concepts around state reset
- StateMachineAccess, replace state reset and variables
  with a StateMachineContext.
- Additional fixes to reset state properly even if
  target transition is a super state.
- Some polish
- Add tests
2015-07-15 11:17:43 +01:00
Janne Valkealahti
8292bbff00 Fixing initial state transitions
- Reported and fixex #81
- Change how internal state is entered and handled
  when transition doesn't terminate into initial state.
- Needed to change stuff in various places because
  some of the concepts were literally broken which were
  overlooked due to missing tests.
2015-07-10 17:24:56 +01:00
Janne Valkealahti
2ac515b04b Polish 2015-07-04 15:34:24 +01:00
Janne Valkealahti
6ae2f2fa43 Can now skip initial state
- Fixes #71
- If substate is entered directry, we don't
  go via initial state for particular state machine
  where transition ends.
- Fixing other tests which assumed initial state is entered.
- In terms of a history state, initial state is still entered.
2015-07-04 15:15:27 +01:00
Janne Valkealahti
e2fe4907d3 Add config builder for distributed machine
- New configurer which can be used to define an ensemble which
  if is set automatically wraps a machine with a distributed
  state machine and sets it to use an given ensemble.
- Relates to #35
2015-06-18 13:20:04 +01:00
Janne Valkealahti
742010f1a5 Change distributed machine to use interceptor
- Move away from using state machine listener if favor
  of interceptor which allows to skip state change.
- Remove previously added method in a
  StateMachineListener. (was a bad idea).
- More tweaks to zk example
- Relates to #35
2015-06-18 11:22:37 +01:00
Janne Valkealahti
1bcdbd5ae0 Add base work for recipes
- Better state sync handling #35
- Adding first recipe for synching and
  persisting a state # 73
2015-06-17 09:19:43 +01:00
Janne Valkealahti
c68fa5d09d Add skeleton for distributed state machine
- NOTE: not yet fully working distributed sm, this
  commit is considered to be a stage 1 of further
  commits on this matter.
- Preliminary concept of DistributedStateMachine,
  StateMachineEnsemble and StateMachinePersist.
- New module spring-statemachine-zookeeper order to
  persist state in a distributed matter.
- Refactoring concept of a state machine access to get
  better internal access into a sm via functional interfaces.
- Change build to use jdk7 and change test to rely on jdk8
  order to test functional lambdas.
- new zookeeper sample demonstrating distributed concepts.
- Relates t0 #35 and #34.
- No docs until things are fully implemented.
2015-06-12 18:15:50 +01:00
Janne Valkealahti
1648b39de1 Lift requirement of enums for states and events
- Relasing the use of enums where applicable
- Fixes #69
2015-06-03 18:26:21 +01:00
Janne Valkealahti
7d26f505a1 Add tests for turnstile sample 2015-05-30 09:29:10 +01:00
Janne Valkealahti
7fa8c12c30 Polish tasks example 2015-05-29 15:07:44 +01:00
Janne Valkealahti
b73e22864f Add missing headers 2015-05-29 11:32:28 +01:00
Janne Valkealahti
b61f7fd3bb Tweaks to fragile tests #36 2015-05-29 11:06:23 +01:00
Janne Valkealahti
61ec8723df Updates to docs 2015-05-29 11:00:32 +01:00
Janne Valkealahti
2df44abc53 Add new washer sample
- This sample demonstrate a use of history state
2015-05-25 11:09:56 +01:00
Janne Valkealahti
2b3db24345 Better support for parallel regions
- Generally fixes #68
- First attempt to externalize event execution from state machine
  into its own class backed by an interface. This relates to #7
- Change of various places to have better support if execution
  is done in threads.
- Not yet a central place where concurrency can be defines, thus
  currently rely on global taskExecutor bean when can be overridded
  from a default which is SyncTaskExecutor. Futher work for
  that in separate tickets.
- Change tasks sample to use a thread pool.
- Change of concept how initial state/transition is handled, no
  longer handled manually in lifecycle method, thus giving a change
  for initial transition to execute its actions in a multiple threads.
2015-05-24 17:38:41 +01:00
Janne Valkealahti
cc4794d014 Add new tasks sample 2015-05-17 16:10:45 +01:00
Janne Valkealahti
44c6e53834 Tune automatic configuration
- Add StateMachineCommonConfiguration for task
  executing and scheduling.
- Add StateMachineConfigurationImportSelector for
  context event configuration.
- Fixes #40
2015-05-08 12:50:04 +01:00
Janne Valkealahti
104d6158e8 Fixing fragile tests
- Trying to fix some tests which are fragile due
  to use of timers and regions.
- Relates to #36
2015-05-06 19:51:59 +01:00
Janne Valkealahti
60e8f0745a Type cast access for ext state variables. 2015-04-10 09:17:28 +01:00
Janne Valkealahti
f776a0acc3 Tune samples and update ref docs
- Fix cplayer play logic depending if we pressed
  eject or play.
- Updates to ref docs.
2015-04-09 12:05:19 +01:00
Janne Valkealahti
c3891fc482 Tryind to fix some test issues 2015-04-08 10:33:10 +01:00
Janne Valkealahti
487911b4de StateContext may use wrong statemachine
- Tweaking to keep correct statemachine ref around
  so that StateContext passed to actions can be
  used to send events within submachines.
- This was missed due to missing test and i.e. cdplayer
  should transition into playing state directly via
  and event sent from action which when closed is
  checking if cd is inserted.
- Fixes #33
2015-04-07 22:18:03 +01:00
Janne Valkealahti
45ebce9c64 Updates to docs and samples 2015-04-06 10:56:16 +01:00
Janne Valkealahti
e5c67b1c22 Reference doc updates 2015-04-05 22:26:26 +01:00
Janne Valkealahti
3f3a8bbc65 Updates to cdplayer sample 2015-04-05 18:50:41 +01:00
Janne Valkealahti
8282daf5d8 Fix substate transition
- Should now correctly do corrent actions when
  transition is between different submachines and
  their substates.
- Fixes #32
2015-04-05 10:12:34 +01:00
Janne Valkealahti
a4fcb9da97 Expose extended state
- ExtendedState is now exposed via
  StateMachine interface.
- Add "sm variables" command to samples.
2015-04-04 10:24:50 +01:00
Janne Valkealahti
e1be34cc92 Fix proper transition into super state
- Big conceptual changes how state transitions
  are handled which now allows more easy ways
  to figure out what to do and where to go.
- Exposing more info via State interface
- Adding tests to samples
- Fixes #30
2015-04-03 10:47:14 +01:00
Janne Valkealahti
85cc2df29e Ref doc updates 2015-03-28 18:53:23 +00:00
Janne Valkealahti
005bf688c3 Updates to showcase sample 2015-03-22 18:56:32 +00:00
Janne Valkealahti
15a88b902a Revert "updates"
This reverts commit 7f11fdc8f9.
2015-03-21 15:23:22 +00:00
Janne Valkealahti
7f11fdc8f9 updates 2015-03-21 15:21:03 +00:00