- 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
- 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
- Change processor registration so that if @WithStateMachine is
used with 'id', 'name' is skipped because it defaults to 'stateMachine'
and would cause extra registration.
- Fixes#370
- Remove synchronization from scheduleEventQueueProcessing
method in executor. Looks like this sync is not really needed
and indeed may cause jvm level deadlocks if threads are used
for execution.
- Fixes#360
- Adding support for javaconfig/uml to define
actions for transitions leading out from a
choice or junction states.
- Support for action for incoming transition is
already implemented as it is defined as normal
transition.
- Fixes#108
- Executor is following anonymous transitions in a loop
and if there is an exception in actions with this transition,
effectively executor ended into infinite loop.
- No bailing out from this loop if we cannot continue.
- Fixes#344
- Trying to handle scenario where TimerTrigger keeps firing
even if machine is stopped or has moved away from its
hosting state.
- Explicitely handle trigger starts/stops in
DefaultStateMachineExecutor when executor itself
is started/stopped.
- Fixes#321
- Add new tests for DefaultStateMachineExecutor to find
possible causes for a deadlock.
- Handle lifecycle scenario little differently
if timer is fired during a executor starting phase
order to not getting into a deadlock.
- Relates to #315
- Modify StateMachineConfiguration and StateMachineFactoryConfiguration
so that if you have different states and events classes with multiple
machines or factories, you can autowire by types without
adding qualifiers.
- Manually try to discover generic types from enclosing adapther class
and if succesfull pass that information into bean definition
as ResolvableType.
- Fixes#306
- Add support so that @WithStateMachine can be used with
machines build via @EnableStateMachineFactory or via
manual builders.
- Adding new annotation @EnableWithStateMachine to help
handling needed context configuration.
- Add tests and docs.
- Fixes#292
- Fixes#224
- Factory now listens machine event if autostart
is requested which should give fully started machine
i.e. if asynch executor is used. Bails out after 30
seconds. Further tweaks like allowing user to define
this time or conditionally not wait could be added later.
- Fix typos.
- Fixes#298