Commit Graph

121 Commits

Author SHA1 Message Date
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
608183f2a3 Add builder pattern for state machine instantiation
- Relates to #45
- Modify current annotation builder model to work via
  manual StateMachineBuilder class.
- Add ConfigurationConfigurer to configure bean factory,
  task executor and task scheduler via builder.
2015-06-13 22:17:06 +01:00
Janne Valkealahti
c03b998d1e Update readme 2015-06-12 19:25: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
7dc56c4867 Fix some typos 2015-06-02 08:13:01 +01:00
Janne Valkealahti
75a4da811e Ref doc updates 2015-05-30 18:01:59 +01:00
Janne Valkealahti
aaa20e6b26 Add better spel support for actions and guards
- Add new StateContextExpressionMethods support class.
- Change SpelExpressionGuard to user methods class.
- Add new SpelExpressionAction which can take expression
  to execute action.
2015-05-30 17:02:45 +01:00
Janne Valkealahti
7d26f505a1 Add tests for turnstile sample 2015-05-30 09:29:10 +01:00
Janne Valkealahti
9fc17338e6 Remove feature limitations section 2015-05-29 17:56:08 +01:00
Janne Valkealahti
d7249bf927 Tune fork/state sections in docs 2015-05-29 17:52:25 +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
2fb774e837 Polish 2015-05-29 11:24:39 +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
517bf69364 Fix fragile tests
- Trying to fix test `StateMachineTests.testTimerTransition`
  by releasing latch after stateContexts list is updated. This
  is probably reason why assert failed for that list size.
- Again, fixes #36
2015-05-17 16:33:13 +01:00
Janne Valkealahti
cc4794d014 Add new tasks sample 2015-05-17 16:10:45 +01:00
Janne Valkealahti
2a31254b91 Add first concept of better internal machine comm
- Add concept of functional interface to work with
  recursive machines for function access.
- This also fixes a machine relay so that every used
  state context gets a correct top level machine
  for correctly dispatching events into a top level handling.
2015-05-17 15:28:42 +01:00
Janne Valkealahti
a4baf0135b Fix some issues for annotated methods for initial state
- Adding new tests for annotated methods.
- Fix a problem so that annotated method can
  be called when ititial state is set.
2015-05-16 17:25:06 +01:00
Janne Valkealahti
6394bae349 Fix join source with region state
- Change factory and join hanling so that if source
  is a region state, actual join states are end states
  from its regions.
2015-05-16 15:33:40 +01:00
Janne Valkealahti
844a70c588 Add way to remove listener
- Change Region interface and underlying listener
  classes so that we can unregister registered
  listeners.
2015-05-16 10:15:28 +01:00
Janne Valkealahti
d5811c3ac4 Fix choice state create
- Fix so that we don't need to define choice
  pseudostate as state.
2015-05-15 16:15:34 +01:00
Janne Valkealahti
d29c240ad0 Fix possible NPE in RegionState 2015-05-15 15:15:26 +01:00
Janne Valkealahti
d847dbacc4 Add tests for fork/join 2015-05-14 17:12:49 +01:00
Janne Valkealahti
80b62bc555 EnumState isSimple() returns wrong value
- Fix wrong boolean return value.
- Fixes #66
2015-05-10 18:16:21 +01:00
Janne Valkealahti
e21b9559da Should not define terminate state as state
- Fix so that we don't need to define terminate
  state as state. Simple defining it as end() is
  enough.
- Fixes #65
2015-05-10 18:07:46 +01:00
Janne Valkealahti
362df027b4 Fix triggerless transition in regions
- Add better support for triggerless transitions in regions.
- Change concept how triggerless transitions are handled.
- Fixes #63
2015-05-10 17:45:32 +01:00
Janne Valkealahti
5e1dec0ede Add test for triggerless region transitions 2015-05-09 19:26:36 +01:00
Janne Valkealahti
214f8a45e3 Triggerless transition doesn't work from initial to terminate
- Fix correct handling in this case.
- Tune lifecycle so that recursive calls to
  start() in a same thread doesn't cause multiple
  calls to doStart().
2015-05-09 17:45:42 +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
3aa53af67b Fixing fragile tests
- More fixes to StateMachineTests
- Relates to #36
2015-05-06 20:22:37 +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
a3cceee651 EnumStateMachineFactory doesn't always check initial state
- Adding initial state check
- Fixes #59
2015-05-06 18:26:43 +01:00
Janne Valkealahti
8e42ca0688 Should not define initial state as state
- Tweak DefaultStateConfigurer so that we don't need
  to define initial state as additional state. Also
  fixed some other issue which caused a bit of a mess
  when i.e multiple states were introduces twice.
- Fixes #29
2015-05-06 10:59:06 +01:00
Janne Valkealahti
1186ae4a71 Support fork/join with regions
- Adding first changes for supporting fork and join
  concepts with regions.
- Change of some pseudostate concepts to have
  better model for this and future work.
- Fixes #39
2015-05-05 19:58:31 +01:00
Janne Valkealahti
a26f4f08d6 RegionState not created with nested states - take 2
- Further fixes for this issue
- Fix some tests which really test wrong conditions.
- Disabled one test which is more feasible to
  fix with region fork/join #39
- Fixes #54 again
2015-05-02 18:41:50 +01:00
Janne Valkealahti
ffa2bcbfa8 RegionState not created with nested states
- EnumStateMachineFactory didn't add created machine
  which wrapped region states into a internal
  machine map which is used to resolve built machines.
- Adding test which simply tests nested regions.
- Fixes #54
2015-05-01 11:26:47 +01:00
Janne Valkealahti
f24dd481bc Spring cleaning, take 1
- Polish, cleaning, tidy up
- Split listener and context events into new StateMachineObjectSupport
- Polish pseudostate handling
- Extract isSubstate into static util function
- Remove event from State exit/entry.
  Event not needed as function argument because
  it's already wrapped in state context.
- Polish how StateContext is created
- Polish state exit/entry
2015-04-26 18:23:49 +01:00
Janne Valkealahti
9d2d4038e2 Support history pseudostates
- Fixes #50 bug which were revealed by
  trying to use history state concepts.
- Fixes #38 for history features.
- Base functionality for deep and shallow
  histories.
- Some housekeeping and polish before doing
  more system wide spring cleaning.
2015-04-26 10:14:53 +01:00
Janne Valkealahti
d31919fd19 Fix typo in readme
- Fixes #48
- Type when copied template from other spring project.
2015-04-24 18:49:43 +01:00
Janne Valkealahti
b45f5ef988 Support choice pseudostate
- Adding choice pseudostate with first/then/last
  structure which is a synonym for if/elseif/else.
- This is a first attempt to bring better pseudostate
  model to a framework.
- Fixes #41
2015-04-23 17:40:34 +01:00
Janne Valkealahti
911901cfb6 Fix base support for region config
- Fixes #46
- Add some region/group info in a state configurer so that
  we know which states are in a same reqion. Just a simple
  uuid for now.
- Send machine started event at end of start and properly
  register listener with regions.
- Fix factory not to mess things up with submachines so
  correctly track if we have multiple initial states.
2015-04-18 19:39:46 +01:00
Janne Valkealahti
8c481b6a21 Fix bean conflict with spring-security
- In ObjectPostProcessorConfiguration change post prosessor
  bean name not to be same as in spring security.
- Fixes #37
2015-04-16 13:45:57 +01:00
Janne Valkealahti
5759fb2180 Set to next build snapshot version 2015-04-14 17:01:32 +01:00
Spring Buildmaster
f8c1554995 Release version 1.0.0.M1 2015-04-14 08:16:46 -07:00
Janne Valkealahti
9c38014369 Fix javadoc warnings 2015-04-14 15:53:41 +01:00
Janne Valkealahti
0365b72dcb Polish docs 2015-04-13 19:34:30 +01:00