49 Commits

Author SHA1 Message Date
daniel ding
f3ec13b32c Fix repository factory choice junction action construction
- add actions to CHOICE & JUNCTION node
- Backport #934
- Fixes #974
2021-06-27 09:33:19 +01:00
Janne Valkealahti
ac7fc23ca0 Change stateMachineContext column lentgh
- To fix HSQLDB default hibernate dialect, change
  length to 10K.
- Other real used DB's should really do this in ddl's.
- Forward port #882
2020-10-17 15:57:43 +01:00
Janne Valkealahti
2aad637f55 Jpa eclipselink compability
- With this change, Eclipselink support is added to SSM.
  To do this, table names are modified and some primitive
  types are changed to object types.
- Edited import class types.
- Relates #833
- Relates #834
2020-03-02 16:54:57 +00:00
Janne Valkealahti
c76283c10b Bump to boot 2.3.0.M2
- Needed gradle change to 5.6
- There's different mongo client in deps so
  needed to fix MongoDbRule as it was done for master.
2020-03-02 12:54:13 +00:00
Spring Operator
426fa163b2 URL Cleanup
- Merge/squash #686 and #694
2019-05-03 15:01:31 +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
james
041189bb31 Use the contextObj as is when saving the StateMachineContext
- Polish and fix some merge issues
- Relates #494
2018-02-21 16:13:50 +02:00
Janne Valkealahti
6a66d7a384 Fix merge error
- Fix changed signatures from spring data in JpaRepositoryTests.
- Relates to #435
2018-01-23 10:12:36 +00: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
7044bf5949 Change JPA initial state field
- Change initial field to initialState which
  resolves initial reserved keywork problem.
- Fixes #472
2018-01-23 09:56:27 +00:00
Janne Valkealahti
58385696d3 Change JPA deferred events constraint
- Define fk in @CollectionTable instead trying
  to wrongly use @JoinTable
- Fixes #468
2018-01-23 09:56:27 +00:00
Janne Valkealahti
551ff9c874 JPA entity changes
- Modify existing JPA entity classes to
  have a fixed names for constraints and
  foreign key. Also name used tables so that
  we don't get crazy long names which are
  causing issues with some DB's
- Fixes #468
- Fixes #469
2018-01-23 09:56:27 +00:00
Janne Valkealahti
7b7da20b70 Add redis/mongo for machine persistence
- Add similar implementations as done for JPA
  which uses redis and mongo.
- Relates #428
2018-01-23 09:56:27 +00:00
Janne Valkealahti
6ba231af2e Make use of kryo more configurable
- Move away from thread local in favour of using
  kryo pooling.
- New interface StateMachineSerialisationService
  with KryoStateMachineSerialisationService.
- Try to work via constructors for instead of full blown
  configuration as it looks like this may give enough
  for users to customise.
- Relates to #437
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
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
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
1a3f7da81c Make mongo tests faster
- There is a newer mongo client with changed behaviour
  as junit rule skipping tests if mongo is not running
  waits 30s for a connect failure. Add new server
  select timeout.
- Fixes #314
2017-02-10 16:12:03 +00:00
Janne Valkealahti
573397b86e Revamp dependency management
- Fixes #313
2017-02-10 15:50:07 +00:00
Janne Valkealahti
3b7bb8139d Update docs
- Add manual repo config example
  for showcase.
- Relates to #270
2016-11-24 08:03:26 +00:00
Janne Valkealahti
0c3ea7fb2d Add initial action to repository config
- Now RepositoryState can have initial action
  if it is an initial state.
- Implement all needed tests.
- Fixes #281
2016-11-23 13:55:52 +00:00
Janne Valkealahti
ea511b8ed8 Fix JPA actions
- Change JpaRepositoryTransition and JpaRepositoryState
  to use ManyToMany instead of OneToMany for
  actions Set.
- Fixes #280
2016-11-23 09:01:33 +00:00
Janne Valkealahti
459d16d31c Update docs
- Add more repository config samples.
- Relates to #270
2016-11-20 14:34:04 +00:00
Janne Valkealahti
b441bf558f Update docs
- Add more repository config docs.
- Relates to #270
2016-11-19 19:05:29 +00:00
Janne Valkealahti
55c6faf225 Fix Redis/Mongo entity states
- Fix RedisRepositoryState and MongoDbStateRepository not to use
  null for machineid in any case as contract is that empty machineid
  is always empty not null.
- This issue was found when adding initial tck config tests, thus
  this commit also adds initial tck tests.
- Fixes #279
- Relates to #278
2016-11-19 17:51:15 +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
ea6648ce0d Polish tests
- For jpa repository tests use same parent
  class as done for redis in #267
2016-11-05 14:46:23 +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
83e59c2a60 Add support for submachine refs
- Relates to #262
2016-10-23 06:50:21 +01:00
Janne Valkealahti
2a74efd5e5 Add support for deferred events
- Relates to #262
2016-10-18 14:58:48 +01:00
Janne Valkealahti
a4c8ddcbdd Add support for end states
- Adding end state construction
- Relates to #262
2016-10-18 09:38:12 +01:00
Janne Valkealahti
36a87493f2 Add support for join/fork states
- Adding join/fork state construction
- Relates to #262
2016-10-18 08:11:10 +01:00
Janne Valkealahti
543c906c35 Add support for entry/exit states
- Adding entry/exit state construction
- Relates to #262
2016-10-11 15:43:02 +01:00
Janne Valkealahti
bd6696920f Add support for junction states
- Adding junction state construction and
  guard resolving.
- Relates to #262
2016-10-11 10:50:08 +01:00
Janne Valkealahti
8e219cffcc Refactor repository actions/guards
- Make RepositoryGuard and RepositoryAction work exactly
  like RepositoryState what comes for class structure
  and how things are saved and used via populator.
- Relates to #262
2016-10-10 20:00:48 +01:00
Janne Valkealahti
de3a9341de Add support for choice states
- Adding choice state construction and
  guard resolving.
- Relates to #262
2016-10-10 08:54:28 +01:00
Janne Valkealahti
d06d45580a Add support for regions
- Add region id to RepositoryState and hook it
  via RepositoryStateMachineModelFactory.
- Relates to #262
2016-10-09 21:22:05 +01:00
Janne Valkealahti
a6d7040199 Add support for history states
- Add PseudoStateKind to RepositoryState.
- Hook shallow and deep historys in
  RepositoryStateMachineModelFactory
- Relates to #262
2016-10-09 17:38:35 +01:00
Janne Valkealahti
3cc33a6fef Fix parent state ref
- For RepositoryState, its parent state is now
  defined as RepositoryState as well allowing
  to reference from a json files.
- Relates to #262
2016-10-09 17:04:36 +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
c016fd6e06 Add repository config guards
- Add guard to RepositoryTransition
- New GuardRepository.
- Relates to #262
2016-10-02 16:28:32 +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
de556f0d54 Add repository config substates
- Add parent state to RepositoryState
  and use it in model factory.
- Relates to #262
2016-10-01 09:34:31 +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
49bae38eb3 Hook StateMachineModelFactory and StateMachineFactory together
- Change so that machine id used in StateMachineFactory
  can use same id in StateMachineModelFactory which now
  extended with method build(String machineId).
- Polish repo and jpa classes.
- Fixes #255
2016-09-25 10:08:57 +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