Commit Graph

250 Commits

Author SHA1 Message Date
Michael Shindle
599ffc99e2 Apply fix for issue #148 to 1.0.x branch. 2016-01-11 17:34:14 -08:00
Spring Buildmaster
ebdb0fd0ed Next development version 1.0.3.BUILD-SNAPSHOT 2015-12-30 04:53:57 -08:00
Janne Valkealahti
5227aea34b Add synchronization
- Relates to #135
2015-12-30 10:55:56 +00:00
Janne Valkealahti
7395b6afcd Update changelog 2015-12-30 09:35:22 +00:00
Janne Valkealahti
b624330681 Fix event defer issues
- Event may get not accepted in some cases
  while it should be deferred. Check defer
  again before accept would return false.
- Relates to #135
2015-12-30 08:58:02 +00:00
Janne Valkealahti
a9f106e930 DefaultStateMachineExecutor using wrong extended state
- Backport #146
- Remove passing extended state into DefaultStateMachineExecutor as
  after machine is reseted and extended state object changed, transitions
  from executor would get wrong object. Just get it from state machine
  itself for StateContext.
- Fixes #147
2015-12-17 19:52:02 +00:00
Janne Valkealahti
f2f8c1a3c4 Wrong publish method calls
- Backport #144
- notifyTransition and notifyTransitionEnd call wrong
  publish methods. fix by well calling correct methods.
- Fixes #145
2015-12-15 08:45:50 +00: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
41371d292b Fix machine autostart with annotation config
- Backport #141 fixes #142
- This seem to relate with machine build from an annotation
  config which is then used as a session scoped bean.
- Fix autostart usage where appropriate and also fix some
  test which were using wrong logic to determine autostart
  usage(tests were wrong).
2015-12-13 14:46:39 +00:00
Janne Valkealahti
8068cb9dd2 StateMachineTestPlan with multiple event
- Backport #134 fixes #136
- Add support for defining multiple events
  within a single step.
2015-12-07 08:14:26 +00:00
Janne Valkealahti
a9d24c038c Event defer for substates and regions
- Backport #131 fixes #135
- Modify state structure so that nested states and orthogonal
  regions can work with deferred events.
- Change executor to work better with deferred events and try
  to provide better model for run-to-completion when execution
  happens in a threads.
- Add new event defer section in ref docs.
2015-12-07 08:12:50 +00:00
Janne Valkealahti
ed25006075 Add support for session scope
- Add tweaks to DisposableBean.destroy() which integrates
  into a lifecycle and properly closes a machine if only
  destroy() is called which is a case when `session` scoped
  bean is destroyed when http session is invalidated.
- Tests in SessionScopedAnnotationTests and
  SessionScopedManualTests for both builder and
  annotation config.
- Fixes #112
2015-11-28 09:13:10 +00:00
Janne Valkealahti
c0b24a3ca1 Fix typo in OnStateMachineStop
- Fixes #129
2015-11-27 07:43:34 +00:00
Janne Valkealahti
68e0cd5f72 Change way BeanFactory and TaskExecutor are set
- Guard LifecycleObjectSupport.afterPropertiesSet() so that
  it's not called twice where other call would be initiated
  by app context if machine is returned as @Bean but still
  normally build via a builder.
- Tune internal handling of BeanFactory and TaskExecutor so that
  we play nice with machine and its executor.
- Fixes #130
2015-11-27 07:41:36 +00:00
Janne Valkealahti
40be191b21 Update tests 2015-11-26 15:30:39 +00:00
Janne Valkealahti
f6037802fd Fix empty @OnTransition
- Fix so that bean method will be called with
  plain @OnTransition having no source or target
  defined.
- Fixes #128
2015-11-26 12:10:22 +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
b5d3c4e3e4 Fix class loading in StateMachineConfiguration
- Change used classloader so that classes in found if
  doing normal boot cli tricks for a sm config adapter.
- Fixes #122
2015-11-26 08:17:51 +00:00
Janne Valkealahti
01dc737bf6 Update docs
- Add missing docs for @StatesOnTransition supported
  method arguments.
- Fixes #124
2015-11-20 16:22:04 +00:00
Spring Buildmaster
baed808847 Next development version 1.0.2.BUILD-SNAPSHOT 2015-11-18 06:58:30 -08:00
Janne Valkealahti
eb51f5427f Update changelog 2015-11-18 13:12:50 +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
56abfab4f8 Update docs 2015-11-15 14:57:41 +00:00
Janne Valkealahti
2b1d06e097 Support context events with StateMachineBuilder
- Fix so that we can annotate @Configuration class with
  @EnableStateMachine assuming config class is not extended
  from StateMachineConfigurer(aka config adapter).
- Allows to create machine via a builder as @Bean still properly
  registring rest of a facilities via @EnableStateMachine.
- Polish other tests by removing registering StateMachineEventPublisherConfiguration
  as it's added via @EnableStateMachine.
- Change AbstractImportingAnnotationConfiguration so that it will not try
  to register bean if implementation returned null definition. Meaning
  StateMachineConfiguration detected that @EnableStateMachine was placed
  on a non-adapter class.
- Fixes #120
2015-11-14 16:11:52 +00:00
Janne Valkealahti
19af615698 Fix NPE with missing configurer
- Throw BeanDefinitionStoreException in favor of NPE if
  @EnableStateMachine or @EnableStateMachineFactory is used
  without a configurer meaning user is missing proper config
  adapter like EnumStateMachineConfigurerAdapter.
- Polish StateMachineConfiguration and StateMachineFactoryConfiguration
  by removing wrong typed refs to Enum.
- Fixes #119
2015-11-14 14:11:07 +00:00
Fabio Falci
5b715d0492 PersistStateMachineHandler returning event outcome 2015-11-05 20:09:16 +00:00
Janne Valkealahti
d55a7ab802 Fix use of multiple EnableStateMachineFactory
- Fixing internal handling of multiple EnableStateMachineFactory
  adapters which were wrongly mixed up during internal
  config build.
- Techically we can have multiple adapters building same state machine and
  same factory if carefully crafted. However a check was missing in
  StateMachineFactoryConfiguration to only attempt configure builder
  for exact attached adapter, thus causing same internal builder called twice
  which then failed because build was already called. This was originally done
  for StateMachineConfiguration but missed for StateMachineFactoryConfiguration.
- Fixes #117
2015-11-05 19:31:36 +00:00
Janne Valkealahti
58e9f01aaf Association with @EnableStateMachine and @WithStateMachine
- Fix bug where multiple machines and beans with @WithStateMachine
  didn't properly separate calling methods with @OnTransition.
- Some polish
- Fixes #116
2015-11-05 13:46:50 +00:00
Janne Valkealahti
9304ddf285 Update to framework 4.2.2
- Fixes #115
2015-10-18 17:21:29 +01:00
Janne Valkealahti
d5c71bb776 Fixing auto-start via @EnableStateMachineFactory
- Machine is now started automatically if it's requested
  from a factory and flag is set.
- Fixes #113
2015-10-16 11:08:08 +01:00
Spring Buildmaster
cabee70593 Next development version 1.0.1.BUILD-SNAPSHOT. 2015-10-11 08:15:38 -07:00
Janne Valkealahti
9e9bb7ff17 Polish docs 2015-10-11 15:47:07 +01:00
Janne Valkealahti
a6f06435e1 Polish docs 2015-10-11 15:45:06 +01:00
Janne Valkealahti
4df80adc4f Fix test 2015-10-11 11:51:59 +01:00
Janne Valkealahti
fe530f9db2 Update readme 2015-10-11 10:53:07 +01:00
Janne Valkealahti
4f5238c572 Polish docs 2015-10-10 11:49:38 +01:00
Janne Valkealahti
280e77347e Add better support for region persist
- Various changes to have a better support for persisting
  regions.
- Fixes for TasksHandler.
- Fixes #94
2015-10-09 17:36:22 +01:00
Mike Krumlauf
7072425400 Refine README 2015-09-08 21:33:55 -04:00
Janne Valkealahti
af6f11a1b6 Align versions in samples 2015-09-08 15:26:31 +01:00
Krumlauf, Michael
2a617008c2 Add missing file 2015-09-08 05:34:52 -04:00
Krumlauf, Michael
671e37ce25 Rename EnsembleListeger to EnsembleListener 2015-09-07 16:19:08 -04:00
Krumlauf, Michael
c6b96aa069 Update to latest versions of several dependencies 2015-09-07 16:17:00 -04:00
Janne Valkealahti
76695443cc update to gradle 2.6 2015-09-06 16:26:11 +01:00
Janne Valkealahti
5dc813ab3f StateMachineTestPlan starts machine too early
- Delaying starting statemachine inside step and
  after listeners has been reset.
- Fixes #104
2015-09-04 08:29:33 +01:00
Janne Valkealahti
f33fa4055c Fix npe with choice
- Preventing passing nulls into factory if choice configurer
  only have last() defined.
- Polish some classes around those classes.
- Fixes #101
2015-09-02 18:35:22 +01:00
Janne Valkealahti
af27f19e63 Update to newer boot and framework versions 2015-08-31 13:54:35 +01:00
Janne Valkealahti
d882c392a9 Fix event handling with threading
- With a combination of a task executor using a thread pool,
  substates with triggerless transitions and actions may fail to
  properly pass on message headers.
- Move queue message outside of loop on a class level which
  should give next loop a change to see previous queued message
  which is then used from triggerless transitions.
- Relates to #100
2015-08-31 10:24:21 +01:00
Janne Valkealahti
7027a2c52a Add docs for TimerTrigger
- Fixes #102.
2015-08-29 18:26:35 +01:00
Janne Valkealahti
ad57bc7085 Add transition header tests for choice 2015-08-29 17:11:15 +01:00
Janne Valkealahti
98b41dde44 Disable artifactoryPublish task for samples
- This should fix errors when we eventually push
  to maven central.
- Fixes #90
2015-08-29 15:55:15 +01:00