Commit Graph

35 Commits

Author SHA1 Message Date
Janne Valkealahti
3ad063a806 Upgrade gradle 7.6.1
- Switch propdeps-plugin to custom OptionalDependenciesPlugin
- Switch io.spring.dependency-management with custom
  spring-statemachine-platform project
- Use proper gradle publication system
- Switch to testfixtures from a custom tests jar
- Migrate to spring-asciidoctor-backends
- Generic changes to bom/starter create as we now use publications
2023-05-31 12:27:41 +01:00
Janne Valkealahti
765b8d15ae Polish build files 2019-05-12 14:23:59 +01:00
Janne Valkealahti
7932545ea9 Reactive test changes for samples
- Relates #744
2019-05-11 08:09:02 +01:00
Janne Valkealahti
52fc9c8568 Initial reactive refactor
- Change to Boot 2.2.x to pick upcoming series.
- Introduce Awaitility to tests
- Introduce new StateMachineEventResult concept in favor of boolean
  when sending events. This result interface will have richer information
  what happens when event is processed as previously we simply had boolean
  flag telling if even was accepted. With StateMachineEventResult we can
  can provide more information like if event was deferred and which region
  provided this message.
- Deprecate old event methods and add new reactive event methods which now
  return a Flux of StateMachineEventResult's. This concept then allows
  to send Flux of events to a machine.
- State exit/entry now return Mono<Void>
- Refactor component lifecycle to be reactive as old start/stop would
  not work anymore in a reactive statemachine simply because start may
  cause changes and execute flow's.
- To ease testing add internal assertj assertions for some classes. This
  work is kept in a test classes for time being to get move to public
  spring-statemachine-test when things are more mature.
- Overhaul StateMachineExecutor interface and replace DefaultStateMachineExecutor
  with ReactiveStateMachineExecutor.
- New ReactiveLifecycleManager which is kinda reactive replacement of some internals
  of a LifecycleObjectSupport. Needed as components are reactively started and
  stopped during a machine execution.
- New RegionExecutionPolicy concept which is an attempt to introduce parallel config
  idea to a regions. Previously this was just naively handled with TaskExecutor which
  never worked perfectly while working through reactor now seem to provide more
  consistent results.
- Some test has been changed to reflect changes in a StateMachineExecutor. Also execution
  using reactor made some changes to state notifications which now seem to be
  more consistent(aka. previously parallel execution might have given notifications
  in wrong order and in some cases kinda bogus changes).
- New turnstile reactive sample which is just start of a reactive sample to show
  concept with webflux.
- Don't yet really add any docs as things are in-flight.
- Fixes #740
2019-05-04 16:31:08 +01: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
jvalkeal
65c9bfac89 Remove spring-statemachine-redis
- For now classes just moved under
  spring-statemachine-data-redis
- Fixes #514
2018-02-23 12:23:32 +02:00
jvalkeal
12b5be0808 Rename sample datajpapersist to datapersist
- As it now supports mongo/redis using profiles,
  remove jpa from name.
- Change build and docs.
- Fixes #509
2018-02-21 17:26:19 +02:00
jvalkeal
ef8704cf44 Base work adding mongo and redis to datajpapersist
- Build deps to mongo and redis
- Config changes using profiles to enable
  mongo or redis while jpa is default
- Relates #509
2018-02-20 08:57:44 +02:00
jvalkeal
6315509165 Rename spring-statemachine-boot
- spring-statemachine-boot is now
  spring-statemachine-autoconfigure
- Fixes #507
2018-02-15 17:54:07 +02: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
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
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
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
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
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
05ef94e0ed Add ordershipping sample
- Fixes #225
2016-05-14 09:42:16 +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
5ec61f35d9 Polish 2016-03-20 09:46:08 +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
af6f11a1b6 Align versions in samples 2015-09-08 15:26:31 +01:00
Janne Valkealahti
48d6459c26 Add zookeeper web example
- This is a web based distributed zookeeper state machine
  sample showing how multiple Spring boot instances having
  a state machine can work with a zookeeper to distribute state
  handling thoughout a jvm boundaries.
- Also this example is using websocket support to have live
  updates of a UI for state machine state changes.
2015-07-31 18:29:06 +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
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
2df44abc53 Add new washer sample
- This sample demonstrate a use of history state
2015-05-25 11:09:56 +01:00
Janne Valkealahti
cc4794d014 Add new tasks sample 2015-05-17 16:10:45 +01:00
Janne Valkealahti
74af052b72 Add base work for cdplayer sample 2015-03-15 19:39:43 +00:00
Janne Valkealahti
fe0f7ebb95 Add complex showcase sm sample 2015-03-07 19:23:40 +00:00
Janne Valkealahti
ed81b1b578 Updates to docs 2015-03-06 15:01:23 +00:00