Commit Graph

530 Commits

Author SHA1 Message Date
Janne Valkealahti
6b636bef2d Add recursive context build
- Fix AbstractStateMachinePersister to handle
  recursive machines and regions.
- Backport #391
- Relates #307
2017-07-09 08:42:44 +01:00
Janne Valkealahti
f268999400 Fix OnExtendedStateChanged with key
- Fix case where method was annotated with
  @OnExtendedStateChanged(key = "V1"), V1 was
  changed which didn't result call to that method.
- Backport #387
- Relates #307
2017-07-09 08:42:11 +01:00
Janne Valkealahti
1e60b7abfa Add support for multiple end states with javaconfig
- Add missing support for defining more than one
  end states and as it's just missing from javaconfig.
- Backport #368
- Relates #307
2017-07-09 08:41:30 +01:00
Janne Valkealahti
526c05e0f9 @WithStateMachine may register too many processors
- Change processor registration so that if @WithStateMachine is
  used with 'id', 'name' is skipped because it defaults to 'stateMachine'
  and would cause extra registration.
- Relates #307
- Backport #370
2017-07-09 08:40:08 +01:00
Janne Valkealahti
f4979411f2 Fix build for spring-context
- Now using spring-context dependency manually
  as framework changed it to optional.
- Fixes #396
2017-07-09 08:34:16 +01:00
Janne Valkealahti
673894b0d6 Update build status images 2017-06-29 14:38:35 +01:00
Janne Valkealahti
258716099d Fix session deps
- Change from spring-session to spring-session-core
  and remove use of ExpiringSession.
- Fixes #385
2017-06-29 14:28:20 +01:00
Fabien Chebel
2fb817f803 Fix PreStateChange interceptors being called twice for END states (#367) 2017-05-29 14:06:44 +02:00
Janne Valkealahti
8d7fe80bdb NPE on sendEvent
- Adding null check for current state
- Remove synchronization from scheduleEventQueueProcessing
  method in executor. Looks like this sync is not really needed
  and indeed may cause jvm level deadlocks if threads are used
  for execution.
- Change how some internals in
  AbstractStateMachine are synchronized
  to limit changes for deadlock.
- Relates to #307
- Backport of #359 #360
2017-05-19 07:52:31 +01:00
Janne Valkealahti
b1d708e241 Fix EventDeferTests
- Change testDeferWithSubsThreadExecutor to use
  more threads if that is a culprint for this
  failure.
- Relates to #343
2017-05-07 09:05:29 +01:00
Janne Valkealahti
3884d48fef Support actions with transition via choice/junction pseudostate
- Adding support for javaconfig/uml to define
  actions for transitions leading out from a
  choice or junction states.
- Support for action for incoming transition is
  already implemented as it is defined as normal
  transition.
- Backport #108
- Relates #307
2017-05-05 14:57:15 +01:00
Janne Valkealahti
d16e29ea45 Fix post interceptor call
- Now calling post state interceptor with
  correct/same state as pre.
- Backport #353
- Relates #307
2017-05-05 14:56:44 +01:00
Janne Valkealahti
d3b6491bbc Fix action error in anonymous transition
- Executor is following anonymous transitions in a loop
  and if there is an exception in actions with this transition,
  effectively executor ended into infinite loop.
- No bailing out from this loop if we cannot continue.
- Backport #344
- Relates #307
2017-05-05 14:55:56 +01:00
Janne Valkealahti
331dc05957 Prevent debug calls
- Polish to do checks for debug/trace logs
- Backport #329
- Relates #307
2017-05-05 14:55:00 +01:00
Janne Valkealahti
c4af0e700b StateMachineContextSerializer handles history and id
- Add missing serialisation for history map and machine id
- Fix possible NPE with extended state
- Backport #331
- Backport #333
- Relates #307
2017-05-05 14:53:51 +01:00
Janne Valkealahti
b2624ada4d Adapt to thymeleaf starter changes
- Add spring-boot-starter-web to samples using
  spring-boot-starter-thymeleaf.
- Fixes #356
2017-05-05 09:21:23 +01:00
Janne Valkealahti
15c537a1c9 Fix monitoring sample tests
- Caused by change of default boot actuator path.
- Fixes #350
2017-04-19 19:18:40 +01:00
Janne Valkealahti
168f6476f9 Adapt to logging changes
- Moving over to log4j2 for test logging.
- Need to follow what happens to commons-logging
  per SPR-14512.
- Relates to #394
2017-04-19 15:12:22 +01:00
Janne Valkealahti
78527fdaec Add logging to failing test
- Relates to #342
2017-04-19 11:11:43 +01:00
Janne Valkealahti
ea9dee4aad Fix mockito deprecation warnings
- Relates to #342
2017-04-11 20:36:55 +01:00
Janne Valkealahti
def0fce98c Use spring-integration-zookeeper
- In favour of deprecater spring-cloud-cluster
- Fixe some zookeeper deprecation issues
- Fixes #345
2017-04-11 20:20:53 +01:00
Janne Valkealahti
7cd5f3c069 Fix Assert deprecation warnings
- Fixes #346
2017-04-11 19:59:44 +01:00
Janne Valkealahti
69c0146d80 Fix eclipse classpath
- Relates to #342
2017-04-11 19:23:07 +01:00
Janne Valkealahti
d92b4e54d0 Fix CdPlayerTests
- Attempt to make these tests more reliable
- testPlayWithCdLoadedDeckOpen using wring latch count
  which may cause test failures.
- Relates to #343
2017-04-10 15:20:49 +01:00
Janne Valkealahti
cf7b9d7e24 Fix StateMachineMonitorTests
- Attempt to make these tests more reliable
- Relates to #343
2017-04-10 14:58:48 +01:00
Janne Valkealahti
cfbe57274c Fix samples for packaging
- Temporary add build to depend on bootJar
  so that samples get created as fatjars.
- Required as boot's plugin is currently being
  re-implemented and this feature is a bit broken.
- Relates to #342
2017-04-10 11:59:57 +01:00
Janne Valkealahti
654c9b84a4 Update propdeps plugin to 0.0.8
- Relates to #342 and gradle 3.4 changes.
2017-04-06 18:21:16 +01:00
Janne Valkealahti
19b23e139c Upgrade gradle to 3.4.1
- Fixes #342
2017-04-06 13:34:56 +01:00
Janne Valkealahti
6ced0371d8 Disarm timers
- Trying to handle scenario where TimerTrigger keeps firing
  even if machine is stopped or has moved away from its
  hosting state.
- Explicitely handle trigger starts/stops in
  DefaultStateMachineExecutor when executor itself
  is started/stopped.
- Backport #321
- Relates to #307
2017-03-09 10:51:20 +00:00
Janne Valkealahti
688b61d5d2 Notify transition before calling its actions
- Add new api to Transition to expose calling
  its actions.
- Modify rest of a framework to first notify before
  calling transtion action.
- Backport #322
- Relates to #307
2017-03-09 10:51:20 +00:00
Janne Valkealahti
6e64797ac7 Support Connection Point References
- Add support to uml parser to properly
  detect and use exit/entry points if those
  are used via connection ref points with
  submachine references.
- Backport #323
- Relates to #307
2017-03-09 10:51:20 +00:00
Janne Valkealahti
7371f67eb6 Timer trigger deadlock in DefaultStateMachineExecutor
- Add new tests for DefaultStateMachineExecutor to find
  possible causes for a deadlock.
- Handle lifecycle scenario little differently
  if timer is fired during a executor starting phase
  order to not getting into a deadlock.
- Backport #315
- Relates to #307
2017-03-09 10:51:20 +00:00
Janne Valkealahti
56f3ea06a0 Add log4j 1.x to build deps
- This is now done manually in build as
  dep boms don't give it anymore. We do this
  until we figure out what is a proper way
  to just depend on log4j 2.x.
- Relates to #327
2017-03-09 10:49:10 +00:00
Gary Rosales
70a8657463 StateMachineInterceptorList set() does nothing
- Fixes #318
2017-02-16 09:31:52 +00:00
Janne Valkealahti
7d83b1432c Add dependencies bom
- Fixes #317
2017-02-14 13:00:03 +00:00
Janne Valkealahti
1a3f7da81c Make mongo tests faster
- There is a newer mongo client with changed behaviour
  as junit rule skipping tests if mongo is not running
  waits 30s for a connect failure. Add new server
  select timeout.
- Fixes #314
2017-02-10 16:12:03 +00:00
Janne Valkealahti
573397b86e Revamp dependency management
- Fixes #313
2017-02-10 15:50:07 +00:00
Janne Valkealahti
90637d68d6 Better generics handling with adapters
- Modify StateMachineConfiguration and StateMachineFactoryConfiguration
  so that if you have different states and events classes with multiple
  machines or factories, you can autowire by types without
  adding qualifiers.
- Manually try to discover generic types from enclosing adapther class
  and if succesfull pass that information into bean definition
  as ResolvableType.
- Backporting #306
- Relates to #307
2017-02-10 11:57:04 +00:00
Janne Valkealahti
c35286e83f Fix typo
- Fixes #310
2017-02-09 17:55:32 +00:00
Janne Valkealahti
29e8cdd276 @WithStateMachine with factory and builder
- Backport #292
- Backport #224
- Add support so that @WithStateMachine can be used with
  machines build via @EnableStateMachineFactory or via
  manual builders.
- Adding new annotation @EnableWithStateMachine to help
  handling needed context configuration.
- Add tests and docs.
- Relates to #307
2017-01-18 09:49:10 +00:00
Janne Valkealahti
17d977ddc1 Make autostart smarter
- Backport #298
- Factory now listens machine event if autostart
  is requested which should give fully started machine
  i.e. if asynch executor is used. Bails out after 30
  seconds. Further tweaks like allowing user to define
  this time or conditionally not wait could be added later.
- Fix typos.
- Relates to #307
2017-01-18 09:48:14 +00:00
Janne Valkealahti
dbbae5f478 Update badges in readme 2016-12-29 09:47:48 +00:00
Janne Valkealahti
d85a9dae25 Fix mongo tck tests
- Just some dependency version issues as
  we didn't get the one in tck tests what
  boot 2.x expects.
- Relates to #206
2016-12-28 20:06:07 +00:00
Janne Valkealahti
862979fc87 Upgrade to spring framework 5
- Enable snapshot repos and pump up to
  framework 5.0.0 and boot 2.0.0 snapshots.
- Due to issue in github.com/spring-gradle-plugins/dependency-management-plugin/issues/136
  define newer log4j version for spring-statemachine-zookeeper
- There were some other minor issues preventing to do this earlier
  which are now fixed in framework snapshots.
- Fixes #296
2016-12-28 17:48:03 +00:00
Janne Valkealahti
72f84b584b Update readme 2016-12-18 17:24:49 +00:00
Janne Valkealahti
1d515bd26c Next development version 2.0.0.BUILD-SNAPSHOT 2016-12-15 11:51:05 +00:00
Spring Buildmaster
ea2fa03de9 Next development version 1.2.1.BUILD-SNAPSHOT 2016-12-14 21:47:29 +00:00
Janne Valkealahti
f64f5e96e0 Update changelog 2016-12-14 21:16:36 +00:00
Janne Valkealahti
5bf0fbb365 Update changelog 2016-12-11 16:00:07 +00:00
Janne Valkealahti
f337505fa3 Update docs
- Polish
- Relates to #284
2016-12-11 11:41:48 +00:00