Commit Graph

72 Commits

Author SHA1 Message Date
Janne Valkealahti
588eee751f Make tests more reliable 2016-05-19 11:13:15 +01:00
Janne Valkealahti
6b93760535 Make tests more reliable 2016-05-18 18:59:05 +01:00
Janne Valkealahti
962c76e91d Make tests more reliable
- Attempt to make testing in CI more reliable as
  all seem to be fine locally.
2016-05-18 11:56:55 +01:00
Janne Valkealahti
dbb510a9d3 Polish 2016-05-14 16:47:31 +01:00
Janne Valkealahti
05ef94e0ed Add ordershipping sample
- Fixes #225
2016-05-14 09:42:16 +01:00
Janne Valkealahti
12137222a8 Join state should not be entered
- Fix join pseudostate to be transient.
- Fix tests which uses wrong concepts.
- Fixes #222
2016-05-06 17:24:54 +01:00
Janne Valkealahti
d781aac80f Add new deploy sample
- Fixes #209
2016-04-25 08:34:46 +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
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
5ec61f35d9 Polish 2016-03-20 09:46:08 +00:00
Janne Valkealahti
66fe71e9cc Enhance things around StateMachinePersister
- Polish StateMachinePersister
- Add redis specific RedisStateMachinePersister
- Add more docs.
- Change eventservice sample to use StateMachinePersister.
- Relates #184
- Relates #185
2016-03-11 18:43:45 +00:00
Janne Valkealahti
5cd7d348e9 Package change
- Move RepositoryStateMachinePersist from support to
  persist as we're starting to have more persist related
  classes.
- Relates to #184
2016-03-06 16:57:48 +00:00
Janne Valkealahti
28a23cbf15 Timer interval reset for states
- Add new features around Trigger to arm/disarm
  it so that state entry/exit can stop firing
  TimerTrigger. Default functionality for timer(long)
  still stays same, however timerOnce(long) will
  kick this new functionality where trigger will fire
  once after state has been entered.
- Fixes #165
2016-03-05 11:28:34 +00:00
Janne Valkealahti
833dc1643c Update docs
- Fixes #168
2016-01-30 18:15:41 +00:00
Janne Valkealahti
1ca88d0a6e Update docs
- First set of changes for #168
2016-01-30 08:47:52 +00:00
Janne Valkealahti
294430c9fb Add redis persist sample
- New sample app eventservice which is used to
  demonstrate how redis is used as a repository
  for StateMachineContext.
- Uses pooled request scope machine instances so
  that with every request a machine is reseted from
  a redis.
- Provides UI to play around.
- Provides rest endpoint to send 'pageview' events
  for processing. For example using curl command like:
  curl http://localhost:8080/feed -H "Content-Type: application/json" --data '{"user":"joe","id":"VIEW_I"}'
- Fixes #160
2016-01-26 13:11:17 +00:00
Janne Valkealahti
71fb0ce869 Version upgrades
- Framework to 4.2.4
- For tests, boot to 1.3.1 and embedded tomcat to 8.0.30
- Polish and re-organise gradle files
- Can now run sample boot apps in sts due to mix of
  previously sts getting older tomcat version.
2015-12-25 17:59:00 +00:00
Janne Valkealahti
d0aaa4bfee Add base security support
- Add base of support using spring security to
  protect events, transitions and actions.
- Fixes #114
2015-12-20 14:33:54 +00:00
Janne Valkealahti
1b0ca6ebef Add scope sample
- Tune docs for usage and sample.
- Fixes #137
2015-12-13 11:13:58 +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