- Add new concepts around executing state do actions
allowing to use timeouts via StateDoActionPolicy.
- Global config per machine or via event headers.
- Fixes#501
- 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.
- Fixes#466
- For testing extended state variables, it's now possible to use
new method expectVariableMatcher which takes hamcrest matcher
as an argument.
- Fixes#483
- 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
- Add new TransitionConflightPolicy and allow to configure
it via an adapter interfaces.
- For now, use it in TransitionComparator which sorts transitions
based on source states. This gives PARENT and CHILD sorting
and allows to choose conflicting transitions either from parent
or child.
- Add new sync thread used in submachines so that one thread is used
in a whole call stach per machine(regions still get their own as well
as a root machine).
- Fixes#456
- Naively with StateMachineConfigurerAdapter or EnumStateMachineConfigurerAdapter
only immediate super type were checked to find user level generics to
instruct IOC for proper resolvable types. This worked with almost all cases
except if user created new base type out from StateMachineConfigurerAdapter and
bean id didn't match what what was trying to get autowired if multiple adapters
were in use.
- Correctly find resolvable type as StateMachineConfigurerAdapter in ResolvableType
which finds an exact correct type to get generics.
- Fixes#454
- Now in AbstractPersistingStateMachineInterceptor it is possible
to use a Function to define which variables are persisted. This
is for cases where it is not desirable to persist some variables
for variours reasons.
- Relates to #423
- In AbstractStateMachine and DefaultStateMachineExecutor
do a little more synchronisation so that submachine is allowed
to do its run-to-completion before parent machine can do its
own transitions. This should fix use cases, when submachine
starts, does its transitions and actions, parent wont try to
do its own triggerless transtions.
- Adding some new tests and fixing one other sync issue with end state.
- Relates to #442
- 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
- 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
- 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
- Makes things less chatty if BeanFactory is null in
StateMachineHandlerCallHelper as this is usually a case
with manual builders outside of app context.
- Fixes#412
- Previously timer were only armed when state
were entered, thus failing for timer to work if
machine were restored. Now changing logic so that
that state have a lifecycle which is called during
machine reset.
- Fixes#381
- Resetting a machine with null context currently
just resets to initial state and clear extended
state variables. Enhance also to clear machine id
which as a user level variable may cause some other
trouble. There are no internal functionality for this
id as it's meant for user consumption.
- Fixes#390
- Fixing machine lifecycle logic when machine
is restored which effectively should not touch
any lifecycle methods as start/stop is
user level action.
- Remove start/stop from restore and attempt to
do same when root machine is started. This also
needed some further changes as some functionality
for restore was essentially broken
- Fixes#386