Commit Graph

412 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
41a340bca3 Migrate to StandardReflectionParameterNameDiscoverer
- This is per deprecation notes in
  LocalVariableTableParameterNameDiscoverer
- Relates #1122
2023-11-13 15:37:16 +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
Niels
19d1fc3836 Implement named transitions
- Backport #850
- Fixes #989
Co-authored-by: Niels Hoppe <niels.hoppe@fokus.fraunhofer.de>
2021-07-11 12:49:21 +01:00
Erik Greijus
4da9c52742 Restore all regions of statemachine
- Restore all regions of statemachine
- A persisted statemachine with orthogonal states will not be correctly
  restored as only the top region gets correctly reset. Tests in
  StateMachineResetTests use the correct way to reset the statemachine
  with all regions
- Fixes #978
2021-06-26 16:25:28 +01:00
George Vagenas
043d2a7531 properly set the bean name for factory generated state machines
- testing: added test case for dynamic generated id
- docs: update documentation
- fix: Support @WithStateMachine for machines generated using either empty id or dynamically generated id
- Fixes #940
2021-04-25 13:55:49 +01:00
xJoeWoo
048e930a19 Replace resetStateMachine with resetStateMachineReactively
- improve AbstractPersistStateMachineHandler#handleEventWithStateReactively
- Fixex #949

Signed-off-by: xJoeWoo <xjoewoo@gmail.com>
2021-04-25 13:19:09 +01:00
Janne Valkealahti
4dcf6dc531 Limit trigger handling concurrency
- Change flatMap to use concurrency 1 in a trigger handling which
  should fix issues when events are sent fast.
- Fixes #942
2021-04-05 13:13:21 +01:00
Janne Valkealahti
341d57e48f Add api sugar for mono gets mono
- While this doesn't change underlying behaviour, add sendEventCollect
  method which takes a mono and returns a mono as list of results.
- Add some notes to docs why this is like this, aka having regions
  returns multiple results.
- Fixes #922
2021-03-13 15:48:49 +00:00
Janne Valkealahti
8e613cc135 Change machine reset to reactive
- Re-implement resetStateMachineReactively as fully reactive
  chain by following same logic as in blocking version.
- New interface ReactiveStateMachineAccess as we need to
  know if one need to call reactive method.
- Fixes #911
2021-03-12 14:29:27 +00:00
Janne Valkealahti
24ed6c3def Polish 2020-12-11 10:30:33 +00:00
Janne Valkealahti
ee348d592f Remove StateMachineInterceptor deprecations
- Forward port #906
- Fixes #907
2020-12-11 10:06:13 +00:00
Janne Valkealahti
89afd543f4 Port core tests to assertj 2020-11-28 17:51:15 +00:00
Janne Valkealahti
bb8d1b3014 Tag additional smoke test 2020-11-22 13:56:26 +00:00
Janne Valkealahti
133bb2002a Make emit non-blocking
- Now doing triggerSink.emitNext with retry instead
  of parking which caused blocking errors from blockhound.
- Retry is now hardcoded and settings for it could be
  exposed later.
2020-11-21 09:56:00 +00:00
Janne Valkealahti
a25b3147b6 Fix trigger sink usage 2020-11-01 13:11:47 +00:00
Janne Valkealahti
7963c24d8c Add notes for action error handling 2020-10-31 13:50:59 +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
aac4e1d70b Remove dep to trigger BubbleException
- As a bad behaviour we relied on reactor throwing
  this particular exception to re-throw it to propagate
  exception order to deny event.
- Now trying to use callback to do a same thing as
  newer reactor versions don't throw anymore.
2020-10-31 09:18:35 +00:00
Janne Valkealahti
7023093e1d Polish 2020-10-25 12:51:28 +00:00
Janne Valkealahti
cf242802e6 Use reactive lifecycle for triggers
- Change to use reactive method for lifecycle handling
  for triggers in an executor.
2020-10-25 10:42:49 +00:00
Janne Valkealahti
066e80dbdd Fix wrong transition with join complete
- Oversight with original reactor work.
2020-10-24 09:53:48 +01:00
Janne Valkealahti
bb46cdbad6 Polish 2020-10-24 09:36:09 +01:00
Janne Valkealahti
15a0b2d3dc Update blockhound settings 2020-10-18 10:08:41 +01:00
Janne Valkealahti
ca615c8237 Polish 2020-10-18 09:16:19 +01:00
Janne Valkealahti
e47221056b Pass event and headers into context
- Deprecated old buildStateMachineContext and add new method
  to pass message order to populate event and headers
  into a context.
- Forward port #870
2020-10-17 16:00:56 +01:00
Janne Valkealahti
70e2c06ae7 Deprecated original interceptor methods
- Original preStateChange and postStateChange are now deprecated
  and once those are removed we don't need to do calls to both
  in StateMachineInterceptorList.
- Relates to #871
2020-10-17 10:44:41 +01:00
Janne Valkealahti
902121c7f1 Remove persisting double invocation
- As it's currently expected that pre/post interceptor are called
  for both preStateChange and postStateChange, fix
  AbstractPersistingStateMachineInterceptor so that actual persist
  doesn't happen twice.
- Eventually original preStateChange and postStateChange methods
  will get removed after deprecation(which should have happened
  a long time ago).
- Forward port #871
2020-10-17 10:44:24 +01:00
Janne Valkealahti
45627e4f63 Reactive PseudoStates
- Change entry/exit functions to reactive types
  to have those in a reactive stack.
- Fixes #878
2020-10-11 13:06:53 +01:00
Janne Valkealahti
e78811eaa9 Remove Function interface
- Switch from org.springframework.statemachine.support.Function
  to java.util.function.Function.
- Fixes #867
2020-09-13 15:03:16 +01:00
Janne Valkealahti
d9e2ed5425 Pass error from executor
- New concept of using callback to pass on error as
  things can't be properly propagated as we're manually
  dispatching to processor.
- Relates #821
2020-09-13 14:20:03 +01:00
Janne Valkealahti
706ae5511f Fix reactive event handling
- Before attempting to add better level of error handling,
  discard all errors what might come from action execution.
- Handle some cases where event deny is reported back as accepted.
- Fix reactor error for double subcription.
- Relates #821
2020-09-09 20:33:35 +01:00
xJoeWoo
61c58cdee0 Improve creation of StateMachineFactory
- Returning factory from StateMachineBuilder.Builder
- Fixes #845
2020-09-06 15:31:31 +01:00
Janne Valkealahti
4e4ed2fc38 Polish 2020-09-06 09:45:07 +01:00
Janne Valkealahti
f835ce6959 Fix javadocs with jdk11
- Forward port #863
2020-09-05 15:27:29 +01:00
Janne Valkealahti
9e0bdae46f Add Flux test for denied result
- Relates #802
2019-12-26 12:41:24 +00:00
Janne Valkealahti
dd2017c8b5 Configure BlockHound 2019-12-26 10:23:17 +00:00
Janne Valkealahti
2eebb2b0bf Polish build 2019-12-25 09:23:49 +00:00
Janne Valkealahti
00a4fae3a1 Add checks for missing transitions
- Now checking if some transitions are missing
  and throwing a proper exception instead of NPE.
- Fixes #775
2019-12-25 08:38:51 +00:00
Janne Valkealahti
20c1f56381 Relax sync in DefaultStateMachineService
- Now starting machine outside of a sycn block with
  acquire vs. release. This should allow long running
  start in a machine to allow next acquire to work faster.
- Forwardport #770
- Relates #777
2019-12-25 07:40:26 +00:00
Janne Valkealahti
96773828fc Docs changes
- Relates #742
2019-08-04 08:04:05 +01:00
Janne Valkealahti
8bd0df9e4c Docs changes
- Add some notes for threading and wipe out TaskExecutor and
  TaskScheduler from docs.
- Some notes about replacement with reactor.
- Relates #742
2019-08-03 15:27:21 +01: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
f1bf35e688 Trigger reactive changes
- Triggers evaluate method is now reactive.
- Various changes for signature change.
- Fixes #799
2019-08-03 12:59:52 +01:00
Janne Valkealahti
e566f7ee65 Polish
- Relates #791
2019-08-03 07:57:16 +01:00
Janne Valkealahti
0a6992959a Fix NPR in ReactiveStateMachineExecutor
- Re-enable test in EventDeferTests as this NPE fix
  now handles smoke test.
- Relates #791
2019-07-01 09:09:12 +01:00
Janne Valkealahti
5128ed735a Change things around guards to reactive
- For Guard and Transition change call stach to be fully
  reactive from executor. Some changed signatures similarly
  what was needed for reactive Actions.
- Disabling one smoke test to get figure out later as
  something is broken somewhere, possible reactor bug...
- Relates #791
2019-06-30 16:51:08 +01:00
Janne Valkealahti
02be7eb478 Polish 2019-06-29 15:49:48 +01:00