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:
Lorin Metzger
2016-02-29 13:26:43 -05:00
committed by Janne Valkealahti
parent c3b3fe65b7
commit d15493435d

View File

@@ -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;
}