Commit Graph

139 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
2025282e06 Polish "Upgrade to Spring Boot 3" 2023-10-05 12:49:46 +01:00
Erik Greijus
497eebe55c Upgrade to Spring Boot 3 2023-08-29 12:52:50 +02: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
b4c2f1849a Port samples tests to assertj 2020-11-28 14:26:11 +00:00
Janne Valkealahti
96eab9d061 Fix deprecations
- Due to switch to boot 2.4.x, fixing various
  deprecations where things mostly come from reactor.
2020-10-31 09:18:35 +00:00
Janne Valkealahti
3309d89491 Disable security on a web sample
- Just exclude SecurityAutoConfiguration
- Fixes #880
2020-10-11 14:12:19 +01:00
Yury Tsarkov
54048b26d9 UML diagram naming fix 2020-10-11 13:09:36 +01:00
Yury Tsarkov
8b6b848784 minor syntax fix 2020-10-11 13:09:36 +01:00
Janne Valkealahti
dd2017c8b5 Configure BlockHound 2019-12-26 10:23:17 +00:00
Janne Valkealahti
de9de85237 Tag to smoke tests 2019-12-25 09:34:59 +00:00
Janne Valkealahti
10ce7a65a4 Move to junit5 in all framework tests
- Just a migration
- Replace RedisRule with EnabledOnRedis
- Replace MongoDbRule with EnabledOnMongoDb
- spring-statemachine-test and some docs contains refs to junit4
  but those are support packages and will stay in place.
- Fixes #779
- Relates #771
2019-12-24 16:52:22 +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
Janne Valkealahti
6befc614a0 Change tasks sample to parallel execution
- Now defining parallel region execution policy as
  TaskExecutor won't work anymore.
- Relates #397
2019-08-03 07:42:12 +01:00
Janne Valkealahti
02be7eb478 Polish 2019-06-29 15:49:48 +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
Janne Valkealahti
5562bfdd12 Move anonymous transitions to reactive chain
- This commit changes a way how triggerless transitions are executed by
  going via new doOnComplete method in StateListener which returns
  Mono<Void>. This used to be a simple fire and forget subscribe via listener
  and now fully handled via reactive chain when state is complete. Rest of
  a changes are to tweak state actions to run parallel to be able to cancel
  those and then follow and track when triggerless transitions need to be
  executed.
- AbstractState still have some work to do for disposing things around
  submachines which currently seem to break thins if handleStateDoOnComplete
  is disposed when submachine state is exited. We'll leave this to get
  fixed later.
- Add tag handling for junit5 which can be set via gradle build properties
  statemachineIncludeTags and statemachineExcludeTags.
- Add BlockHound to build which can be activated via gradle build
  property statemachineBlockHound.
- Add org.awaitility:awaitility to various test deps.
- Mostly relates to #734
2019-05-25 13:53:31 +01:00
Janne Valkealahti
efbd72b4d1 Add turnstile reactive docs
- Relates #742
2019-05-17 16:04:20 +01:00
Janne Valkealahti
765b8d15ae Polish build files 2019-05-12 14:23:59 +01:00
Janne Valkealahti
aa3c8415b8 Reactive changes for samples
- Relates #750
2019-05-12 07:04:19 +01:00
Janne Valkealahti
64779f4039 Reactive changes for samples
- Relates #750
2019-05-11 09:27:13 +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
Spring Operator
885836400f URL Cleanup
- Merge/squash #688
- Exclude all .di, .notation and .uml files whose id's cannot be
  changed.
2019-05-04 13:37:36 +01:00
Spring Operator
426fa163b2 URL Cleanup
- Merge/squash #686 and #694
2019-05-03 15:01:31 +01:00
Janne Valkealahti
5ccc82af1c Re-enable devtools for samples
- Change plugin config not to exclude devtools.
- Add spring.h2.console.enabled=true to samples
  using embedded db.
- Fixes #623
2019-01-20 14:02:05 +00:00
Janne Valkealahti
4feeb196cf Document region changes
- Add new docs for regions changes related to StateMachineContext
  and StateConfigurer.
- Document new datajpamultipersist sample.
- Fixes #621
2019-01-20 13:55:24 +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
2c9d951f99 Upgrade to Spring Boot 2.1.x
- Simple boot 2.1.x upgrade
- Pump up gradle to 4.4 as required
- Allow one test to override bean as that's what it does
- Fixes #602
2018-11-11 07:48:06 +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
0f6a3ce4c3 Upgrade to boot 2.0.0.RC2
- Fix monitoring sample due to actuator changes in boot
- Fixes #513
2018-02-22 08:51:51 +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
jvalkeal
5d1820e553 Polish cdplayer sample tests
- Now hopefully these tests are more reliable
- Relates #343
2018-02-14 15:28:08 +02:00
jvalkeal
a4d43131ea Add support for completion transitions
- Currently into as internal new feature, add state
  completed concecept and use it in various places.
- Main focus for this commit is to add support using
  anonymous transitions with state do actions which
  requires proper completion schematics.
- Internal functionality here will probably expose to
  user level in future releases using various other
  concepts.
- Backport #466
- Relates #504
2018-02-13 12:37:04 +02:00
jvalkeal
328a2e9161 Implement custom trace repository
- Upgrade to boot 2.0.0.RC1
- Copy original boot's tracing features to get used
  as a base impl for statemachine.
- Fix samples, tests.
- Fixes #491
2018-02-11 09:28:28 +02:00
Janne Valkealahti
cbc8bf80d2 Documentation changes
- Document changes to JPA Entity model, persistence
  facilities and related new interfaces and services.
- Relates to #429
- Relates to #476
2018-01-23 09:56:44 +00:00
Janne Valkealahti
66b93033f5 Fix datajpapersist sample
- Fix sample per changed release logic
  in DefaultStateMachineService.
- Relates to #432
2018-01-23 09:55:26 +00:00
Janne Valkealahti
51412b5d03 Change persistence model structure
- Fix wrong acquire logic in DefaultStatemachineService.
- Overhaul StateMachineRuntimePersister
- Change StateMachineRuntimePersister to extend
  StateMachinePersist which should work better on
  a bean level. Also add generic type T to it and
  config where needed.
- Relates to #432
- Relates to #427
2018-01-23 09:55:26 +00:00
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