Commit Graph

99 Commits

Author SHA1 Message Date
Janne Valkealahti
3d538f7600 Add base DefaultStateMachineService implementation
- First take on new interface StateMachineService with
  its default impl.
- Modify datajpapersist sample to use it.
- Relates to #432
2018-01-23 09:55:26 +00:00
Janne Valkealahti
c0e5a9d305 Preliminary support for Spring Data persist
- Add new repository model for storing StateMachineContext
  via a new StateMachineRepository.
- New StateMachineRuntimePersister interface to abstract needed
  functionality to do a runtime machine persistence.
- As runtime persistence, as of now, is done via interceptors, define
  JpaRepositoryStateMachinePersist and JpaPersistingStateMachineInterceptor
  to define StateMachineRuntimePersister logic.
- Add new datajpapersist sample demonstrating new concepts.
- Keep tests related to jpa as there's not redis/mongo integration
  implemented in this first iteration.
- As this is going to be WIP until features around this issues
  are completed, docs, etc are not yet added. Also, interfaces and impls
  are subject to change during a process.
- Relates to #423
- Relates to #426
- Relates to #427
2018-01-23 09:55:26 +00:00
Janne Valkealahti
f0b27cde10 Upgrade to boot 2.0.0.M7
- Fix monitoring sample for changes.
- Fixes #450
2017-11-30 09:24:44 +00:00
Janne Valkealahti
39f1e6e7ca Fix changes in micrometer
- Fixes #410
2017-11-04 11:26:45 +00:00
Janne Valkealahti
be57d1a42e Polish
- Remove unused imports.
- Fix some deprecations in boot 2.x
2017-10-29 16:36:53 +00:00
Janne Valkealahti
9a4f48708e Fix combatibility with boot 2.x
- Change test runtime deps for RedisRule not to fail.
- Fix metrics tests to align changes in boot's
  new micrometrics.
- Fixes #410
- Fixes #418
2017-10-29 15:55:24 +00:00
Janne Valkealahti
29303eb5f4 Fixes to actuator metrics
- Quick fix to get something out from
  new boot 2.x metrics.
- Change source to java 8 compat
- Add new micrometer deps to build
- Docs and further changes will get done
  when new boot metric system completes.
- Fixes #410
2017-09-15 16:01:44 +01:00
Janne Valkealahti
5035a08e1b Fix actuator usage
- On monitoring sample, enable actuators
- Fix test for changed trace output.
- Fixes #408
2017-09-10 10:11:41 +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
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
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
573397b86e Revamp dependency management
- Fixes #313
2017-02-10 15:50:07 +00:00
Janne Valkealahti
922473220d Autoconfigure repositories and entities
- Add auto-config for JPA, MongoDB and Redis
  repositories and their entity classes.
- Fixes #282
2016-11-24 11:42:10 +00:00
Janne Valkealahti
735a06f28c Fix typos
- "contextOjb" vs. "contextObj"
- Fixes #269
2016-11-09 14:18:35 +00:00
Janne Valkealahti
cc2893c4b8 Implement action monitoring and tracing
- Modify transitions and actions so that
  action execution can be monitored.
- Extend StateMachineMonitor
- Add new ActionListener
- Relates to #149
2016-10-27 06:58:23 +01:00
Janne Valkealahti
81e3c8697f Add datajpa sample tests
- Relates t0 #262
2016-10-21 07:51:23 +01:00
Janne Valkealahti
895b30a1c4 Add tests for monitoring sample
- Relates to #149
2016-10-19 08:11:50 +01:00
Janne Valkealahti
79f0280990 Add monitoring subsystem
- This is a preliminary work.
- New monitoring and tracing conceps around StateMachineMonitor.
- Adds hooks internally to better calculate transition times.
- Add new annotation configurer for monitors.
- New boot module which autoconfigures monitoring for boot's metrics
  and trancing repos.
- New monitoring sample.
- Relates to #149
2016-10-18 06:54:47 +01:00
Janne Valkealahti
1beb0e6860 Fix datajpa sample
- Relates to #262
2016-10-10 20:13:41 +01:00
Janne Valkealahti
c7951c5001 Use references in RepositoryTransition
- Refactor so that we can create RepositoryState in one place
  and then reference to it from JpaRepositoryTransition impls.
- New common top class BaseRepositoryEntity for entities
- Change RepositoryState and RepositoryTransition to be abstract
  classes instead of interfaces.
- New custom StateMachineJackson2RepositoryPopulatorFactoryBean and
  StateMachineJackson2ResourceReader handling json refs.
- Relates to #262
2016-10-09 10:21:22 +01:00
Janne Valkealahti
ddf81c78a0 Add repository config transition type
- Add transition type to RepositoryTransition
- Relates to #262
2016-10-02 15:30:01 +01:00
Janne Valkealahti
0b6f67ece4 Add repository config actions
- Add action to RepositoryTransition, state/entry/exit
  actions to RepositoryState.
- New ActionsRepository.
- Relates to #262
2016-10-02 14:42:12 +01:00
Janne Valkealahti
3cc626c947 Upgrade to Boot 1.4.1
- Align related spring train deps
- Modify some other deps to get correct versions
- Some testing changes as boot 1.4.1 shuffled some
  test stuff around.
- Fixed deprecations with newer boot and framework
- Fixes #256
2016-09-30 07:55:12 +01:00
Janne Valkealahti
fe8c120bd4 Add docs for repository config
- Docs for base usage, jpa and jpa sample.
- Relates to #238
2016-09-25 17:02:11 +01:00
Janne Valkealahti
0d329d9e57 Add initial infra for config repository
- Initial infra for config abstraction with
  Spring Data Repositories via RepositoryStateMachineModelFactory.
- Initial jpa impl.
- Initial jpa sample atop of H2 DB.
- Relates to #250
2016-09-23 17:26:39 +01:00
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