When using the StateMachineBuilder outside of the springboot framework, it is not possible to create a timer trigger, because the taskScheduler is not set on the TimerTrigger/LifecycleObjectSupport when the AbstractStateMachineFactory is building the TimerTrigger. This results in a NullPointerException while building the StateMachine.
This commit is contained in:
committed by
Janne Valkealahti
parent
c3b3fe65b7
commit
d15493435d
@@ -556,6 +556,10 @@ public abstract class AbstractStateMachineFactory<S, E> extends LifecycleObjectS
|
||||
if (beanFactory != null) {
|
||||
t.setBeanFactory(beanFactory);
|
||||
}
|
||||
if( taskScheduler != null )
|
||||
{
|
||||
t.setTaskScheduler(taskScheduler);
|
||||
}
|
||||
trigger = t;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user