Commit Graph

35 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
Janne Valkealahti
1c974ac3f9 Configure spring repos conditionally
- Depending on a build, use milestone and/or snapshot repos
- Relates #1122
2023-11-13 13:15:37 +00:00
Eric Haag
8194d8da45 Connect build to ge.spring.io
This change publishes a build scan to ge.spring.io for every local
build from an authenticated Spring committer and for CI where
appropriate access tokens are available. The build will not fail if
publishing fails.

This change also allows the build to benefit from remote build caching,
providing faster builds for all contributors.

Additionally, the project will have access to all features of Gradle
Enterprise such as:

- Dashboards to view all historical build scans, along with performance
   trends over time
- Build failure analytics for enhanced investigation and diagnosis of
   build failures
- Test failure analytics to better understand trends and causes around
   slow, failing, and flaky tests
2023-10-09 10:12:31 +01:00
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
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
6315509165 Rename spring-statemachine-boot
- spring-statemachine-boot is now
  spring-statemachine-autoconfigure
- Fixes #507
2018-02-15 17:54:07 +02:00
jvalkeal
a988410ab5 Add starter
- New starter spring-statemachine-starter which simply
  add boot module and uses bom.
- Fixes #458
2018-02-11 14:20:13 +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
7d83b1432c Add dependencies bom
- Fixes #317
2017-02-14 13:00:03 +00:00
Janne Valkealahti
4dbccf84fa Add mongodb repository config support
- Pretty much following what was done
  for jpa and redis.
- Fixes #275
2016-11-13 08:23:25 +00:00
Janne Valkealahti
fd6fcb6ee2 Add redis repository config support
- Change machine id as empty string instead of null
  if it's not set.
- Implement domain classes for redis.
- Shared tests.
- Fixes #267
2016-11-05 10:04:20 +00: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
50d32c2c26 Add new tests for Choice exit
- New test for choice exit scenario which
  I thought was broken.
- Add new spring-statemachine-build-tests project to
  ease testing so that we can mix everything. This
  project is a topdog which can depend on all other
  modules.
- Relates to #203
2016-04-19 19:20:06 +01:00
Janne Valkealahti
51145f1368 Add base support for eclipse papyrus modeling
- First stage to add support for UI modeling via
  eclipse uml2 and papyrus frameworks.
- Add new interface StateMachineModelFactory which is
  a central point of building machines models outside
  of a normal annotation/build classes. What this mean is
  a hook to config model so that machine can be defined
  via a model factory, instead of writing config based on
  normal adapter callbacks.
- Integrate model config into an annotation model so that
  you can still use normal adapters but point those to
  model factory classes, which then allows external hooks
  for machine configuration.
- New spring-statemachine-uml package which supports
  eclipse uml2/emf frameworks to define a machine config.
- Relates to #193
2016-04-09 16:04:16 +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
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
3e322e4d00 Add redis persisting support
- Add new StateMachineContextRepository interface.
- Add new redis module having persisting support
  for StateMachineContext.
- Extract kryo serializers into a new kryo module which
  is then shared with zookeeper and redis modules.
- We'll add redis related tests later when we figure out
  a correct pattern for integration tests.
- Fixes #110
2015-12-20 15:44:15 +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
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
e92a6c5a09 Add test framework skeleton
- Relates to #49
- New project spring-statemachine-test which contains public
  classes to easy generic state machine testing.
- Concepts of StateMachineTestPlan and StateMachineTestPlanBuilder.
- Replaced one zk test to use this framework.
2015-07-26 13:27:10 +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
Janne Valkealahti
48c65fd9ac initial import 2015-02-04 18:17:50 +00:00