I have an use case of having one statemachine for trip and another one for order. Statemachine was working fine with trip but when introduced new statemachine for Order Code compilation got failed.
here is my state machine configuration
@Configuration
@EnableStateMachineFactory
public class TripStateMachineConfiguration extends EnumStateMachineConfigurerAdapter<TripState, TripEvent> {
@Configuration
@EnableStateMachineFactory
public class OrderStateMachineConfiguration extends EnumStateMachineConfigurerAdapter<OrderState, OrderEvent> {
Field stateMachineFactory in com.ril.newcommerce.supplychain.tms.statemachine.OrderStateMachineHandler required a bean of type 'org.springframework.statemachine.config.StateMachineFactory' that could not be found.
I can see that TripStateMachineConfiguration gets executed when code complies.
Hi Team,
I have an use case of having one statemachine for trip and another one for order. Statemachine was working fine with trip but when introduced new statemachine for Order Code compilation got failed.
here is my state machine configuration
@Configuration @EnableStateMachineFactory
public class TripStateMachineConfiguration extends EnumStateMachineConfigurerAdapter<TripState, TripEvent> {
@Configuration @EnableStateMachineFactory public class OrderStateMachineConfiguration extends EnumStateMachineConfigurerAdapter<OrderState, OrderEvent> {
Here is I am trying to autowire it
@Autowired private StateMachineFactory<TripState, TripEvent> stateMachineFactory;
@Autowired private StateMachineFactory<OrderState, OrderEvent> stateMachineFactory;
I am getting below error
Field stateMachineFactory in com.ril.newcommerce.supplychain.tms.statemachine.OrderStateMachineHandler required a bean of type 'org.springframework.statemachine.config.StateMachineFactory' that could not be found.
I can see that TripStateMachineConfiguration gets executed when code complies.