- Backport #146
- Remove passing extended state into DefaultStateMachineExecutor as
after machine is reseted and extended state object changed, transitions
from executor would get wrong object. Just get it from state machine
itself for StateContext.
- Fixes#147
- Backport #141fixes#142
- This seem to relate with machine build from an annotation
config which is then used as a session scoped bean.
- Fix autostart usage where appropriate and also fix some
test which were using wrong logic to determine autostart
usage(tests were wrong).
- Backport #131fixes#135
- Modify state structure so that nested states and orthogonal
regions can work with deferred events.
- Change executor to work better with deferred events and try
to provide better model for run-to-completion when execution
happens in a threads.
- Add new event defer section in ref docs.
- Add tweaks to DisposableBean.destroy() which integrates
into a lifecycle and properly closes a machine if only
destroy() is called which is a case when `session` scoped
bean is destroyed when http session is invalidated.
- Tests in SessionScopedAnnotationTests and
SessionScopedManualTests for both builder and
annotation config.
- Fixes#112
- Guard LifecycleObjectSupport.afterPropertiesSet() so that
it's not called twice where other call would be initiated
by app context if machine is returned as @Bean but still
normally build via a builder.
- Tune internal handling of BeanFactory and TaskExecutor so that
we play nice with machine and its executor.
- Fixes#130
- Remove most of a static class modifiers from docs
to make things easier if doing copy/paste. Not
all can be removed because some spring inner
config classes has to be static.
- Fixes#123
- Fix so that we can annotate @Configuration class with
@EnableStateMachine assuming config class is not extended
from StateMachineConfigurer(aka config adapter).
- Allows to create machine via a builder as @Bean still properly
registring rest of a facilities via @EnableStateMachine.
- Polish other tests by removing registering StateMachineEventPublisherConfiguration
as it's added via @EnableStateMachine.
- Change AbstractImportingAnnotationConfiguration so that it will not try
to register bean if implementation returned null definition. Meaning
StateMachineConfiguration detected that @EnableStateMachine was placed
on a non-adapter class.
- Fixes#120
- Throw BeanDefinitionStoreException in favor of NPE if
@EnableStateMachine or @EnableStateMachineFactory is used
without a configurer meaning user is missing proper config
adapter like EnumStateMachineConfigurerAdapter.
- Polish StateMachineConfiguration and StateMachineFactoryConfiguration
by removing wrong typed refs to Enum.
- Fixes#119
- Fixing internal handling of multiple EnableStateMachineFactory
adapters which were wrongly mixed up during internal
config build.
- Techically we can have multiple adapters building same state machine and
same factory if carefully crafted. However a check was missing in
StateMachineFactoryConfiguration to only attempt configure builder
for exact attached adapter, thus causing same internal builder called twice
which then failed because build was already called. This was originally done
for StateMachineConfiguration but missed for StateMachineFactoryConfiguration.
- Fixes#117
- Fix bug where multiple machines and beans with @WithStateMachine
didn't properly separate calling methods with @OnTransition.
- Some polish
- Fixes#116
- With a combination of a task executor using a thread pool,
substates with triggerless transitions and actions may fail to
properly pass on message headers.
- Move queue message outside of loop on a class level which
should give next loop a change to see previous queued message
which is then used from triggerless transitions.
- Relates to #100
- Change DefaultStateMachineExecutor to keep event message
around and then loop triggerless transitions order to
pass that message to whole chain.
- Fixes#100
- Enhancing internal model so that event and its headers can
be passed into action if it's used in an initial sub-state
when transition target its super state.
- Added tests and better docs.
- Fixes#99.
- Modifying concepts around DistributedStateMachine and
ZookeeperStateMachineEnsemble to get better handling when
zk connection is lost.
- New jepsen test showing that after a brain split machine
will get back to a consistent state.
- Polish javadocs
- Hopefully fixes#91
- Check task is null and then set it was wrongly
not made as thread safe, changing it to be wrapped
inside AtomicReference.
- This relates to #76 and hopefully fixes#96
- New extendedStateChanged method in StateMachineListener and
its wingman OnExtendedStateChanged in context events.
- DefaultExtendedState is now using ObservableMap to get notify
when individual variables has been modified.
- Fixes#85
- Now using stateMachineTaskExecutor instead of taskExecutor
so that it's easier to use custom executor and not to
collide with bean created i.e. scheduling.
- Fixes#83
- Change previous DistributedStateMachine fixes which didn't
really work. Now explicitely getting state from machine to be set
into ensemble for post internal transition.
- Now can send Message<E> via test plan instead of plain E.
- More testing for tweaked features.
- For some reason ZookeeperStateMachineEnsemble may return null
for very early when postTransition() is handled. Adding check not
to ping back ensemble if its getState() returns null. It really
feels a bit wrong right now, so need to follow this.
- Synchronize JoinPseudoState's
JoinTracker.stateChanged(State<S, E>, State<S, E>) method
for playing nice with concurrent region execution.
Should fix#93.
- Tuning test which relates to #76. What comes for the
tests, there was this concurrency issue and also problem
in tests itself.
- Polish JoinPseudoState.
- Add related error handling methods to StateMachine.
- Enhance StateMachineListener and context events around
error events.
- Modify StateMachineInterceptor and stuff around it order
to handle errors.
- Fixes#6, fixes#77
- Fix some concurrent event issues which were
born with new tests
- Enhance tests for dist machine and ensemble
- Add new features to testing system
- Polish and add more logging
- Fix AbstractStateMachineFactory so that it does not try
to create transitions with null source or target. Basically we
just skip transition source or target which doesn't belong to
region.
- Change DefaultExtendedState to use ConcurrentHashMap so that
there's less change to get into trouble with concurrency.
- Add statechart for tasks recipe.
- Fix various concepts in TasksHandler and its tests.
- Prepare some examples for docs.
- Fixes#74
- Fixes#86
- Fix internal transition changes when extended
state variables has been modified. Also internal
transition is now correctly passed into other
distributed state machines.