Commit Graph

41 Commits

Author SHA1 Message Date
Janne Valkealahti
e62b09d2bb Overhaul gradle build
- Focus of this commit is to have modern gradle build.
- Migrate most of a plugin configurations from dsl
  into buildSrc.
- This fixes issues with existing docs build.
- Allows to sign files so that we have that part
  done for central in a build.
- We can skip publishing samples.
- We're able to share similar logic for modules
  which are meant for publish or just being samples.
- It's easier to upgrade gradle versions without
  getting various build issues.
- Relates #1143
2024-03-14 12:26:47 +00:00
xJoeWoo
048e930a19 Replace resetStateMachine with resetStateMachineReactively
- improve AbstractPersistStateMachineHandler#handleEventWithStateReactively
- Fixex #949

Signed-off-by: xJoeWoo <xjoewoo@gmail.com>
2021-04-25 13:19:09 +01:00
Janne Valkealahti
20daa7cc2d Port recipes tests to assertj 2020-11-28 14:55:03 +00:00
Janne Valkealahti
ac3e4193d7 Polish 2020-09-10 07:56:52 +01:00
xJoeWoo
34a28b57fa Add generic thread safe support to PersistStateMachineHandler 2020-09-06 16:15:21 +01:00
Janne Valkealahti
eea8f1f045 Attempt to fix flaky tests
- Change timeouts
- Switch to assertj
2020-09-06 08:34:20 +01:00
Janne Valkealahti
dd2017c8b5 Configure BlockHound 2019-12-26 10:23:17 +00:00
Janne Valkealahti
da9c68f4e6 Remove TaskExecutor and TaskScheduler
- As all execution and scheduling is now in reactor,
  remove all traces of these spring interfaces.
- Fixes #800
2019-08-03 14:40:37 +01:00
Ming Deng
9f10700da2 Refactor to junit5
- remove junit4 dependecies
- refactor the unit tests by junit5
- enhance the spring-statemachine-test and spring-statemachine-build-tests so they can work together with junit4/junit5
- relates #779
2019-06-08 07:23:59 +01:00
Ming Deng
f816a88e7e Change StateMachineFunction to Consumer
- Remove StateMachineFunction class
- Replace StateMachineFunction with Consumer
- Fixes #767
2019-05-27 08:44:33 +01:00
Janne Valkealahti
7f1fa456aa - Deprecate handleEventWithState in favour of handleEventWithStateReactively.
- Change handleEventWithState to use blocking methods as function
  is essentially blocking. Will get removed in future.
- Fix tests
- Relates #750
2019-05-11 16:20:32 +01:00
Janne Valkealahti
cd37ab871a Reactive test changes for uml and recipes
- Relates #744
2019-05-10 16:19:42 +01:00
Spring Operator
426fa163b2 URL Cleanup
- Merge/squash #686 and #694
2019-05-03 15:01:31 +01:00
Janne Valkealahti
53d6ddefa9 Fix StateMachineInterceptor calls
- Due to a regression when new preStateChange method were
  added to pass on root machine, old method did not get
  called anymore. Now calling that as well and fixing
  some other things around it.
- Same changes for postStateChange.
- Fixes #633
2019-03-11 11:17:45 +00:00
Janne Valkealahti
84ca0aec3e Refactor region handling and persistence
- Make kryo in AbstractKryoStateMachineSerialisationService aware of same classloader
  most likely use in an app. This takes away some of those weird kryo
  errors you see with a web apps.
- Add context references concept to StateMachineContext which can be used
  to store reference id and then individual running machines with regions
  can independently store their states. Whole machine state can then get
  restored more accurately.
- Add new `region(String id)` to StateConfigurer which can be used to set region id.
  This is equivalent as setting region id with json based machine structure where
  you need to define region id's with orthogonal regions are in use.
- Add new datajpamultipersist sample showing running regions and how those are
  persisted to a database.
- Fixes #617
- Fixes #605
- Fixes #615
2019-01-12 08:37:34 +00: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
735a06f28c Fix typos
- "contextOjb" vs. "contextObj"
- Fixes #269
2016-11-09 14:18:35 +00:00
Janne Valkealahti
bd7e0141ea Fix interceptor handling
- Modify so that interceptor `preStateChange` is not called
  for transient states which would falsely try to i.e. persist
  choice and other states with persist recipe.
- Added some tests to verify that `preStateChange` is called
  only once.
- Relates to #266
2016-10-29 08:48:53 +01:00
Janne Valkealahti
049f811f56 Refactor join handling
- Refactor how join is handled
- Add new StateListener for listening entry/exit per State.
- Transition is now passed to next guy from a join state.
- A lot of changes in core machine/factory/executor to support
  this new join handling.
- Fixes #235
- Fixes #237
2016-08-11 08:58:34 +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
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
Fabio Falci
5b715d0492 PersistStateMachineHandler returning event outcome 2015-11-05 20:09:16 +00:00
Janne Valkealahti
4df80adc4f Fix test 2015-10-11 11:51:59 +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
Janne Valkealahti
b90382575c Move StateMachinePersist up to parent package 2015-08-28 09:15:08 +01:00
Janne Valkealahti
edf3938c9d Tuning TasksHandlerTests, take2 2015-08-14 09:59:00 +01:00
Janne Valkealahti
a2ff794ebd Tuning TasksHandlerTests 2015-08-14 09:56:54 +01:00
Janne Valkealahti
7f7c2334ff Add state reset for regions
- This relates to #94 but doesn't provide full solution
  as it simply allows to use nested state machine contexts
  to reset region states.
2015-08-13 14:37:48 +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
e6c400e31c Fix jdk8 javadoc build 2015-08-04 09:08:22 +01:00
Janne Valkealahti
ba6c689123 Fix for failing tests 2015-07-25 17:22:54 +01:00
Janne Valkealahti
178ee816a4 Enhancements to tasks recipe
- Fix AbstractStateMachineFactory so that it does not try
  to create transitions with null source or target. Basically we
  just skip transition source or target which doesn't belong to
  region.
- Change DefaultExtendedState to use ConcurrentHashMap so that
  there's less change to get into trouble with concurrency.
- Add statechart for tasks recipe.
- Fix various concepts in TasksHandler and its tests.
- Prepare some examples for docs.
- Fixes #74
2015-07-25 17:09:54 +01:00
Janne Valkealahti
0cdd833648 Enhance concepts around interceptor
- Rename StateChangeInterceptor to StateMachineInterceptor and
  add methods for pre/post transitions.
- Adding getId concept into a state machine to help distributed
  machines to know from where a state change originates.
- Fix ZookeeperStateMachineEnsemble to work better with
  persisted state machine contexts.
2015-07-19 10:33:28 +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
cb3b811707 Fix for failing test 2015-07-04 18:39:20 +01:00
Janne Valkealahti
bdbe9c32db Fix for failing test 2015-07-04 18:27:29 +01:00
Janne Valkealahti
ddc19392c6 Further fixes for tasks recipe
- Relates to #74
- Add missing features for listener
- Tweak rest of a missing tasks features
2015-07-04 18:13:07 +01:00
Janne Valkealahti
2ac515b04b Polish 2015-07-04 15:34:24 +01:00
Janne Valkealahti
4b858b1d9b Add skeleton for tasks recipe
- Relates to #74
- Tasks recipe not yet fully working, need to get
  this work in to be able to work with other tickets.
- Add childs to StateMachineContext
- A lot of fixes to regions concept throughout
  a code base. Some of the concepts were really broken
  if there were a complex recursive set of regions, etc.
- Add task executor/scheduler to StateMachineBuilder
2015-07-03 14:02:17 +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