use of com.sequenceiq.flow.core.FlowEventListener in project cloudbreak by hortonworks.
the class AbstractFlowConfiguration method createFlow.
@Override
public Flow createFlow(String flowId, String flowChainId, Long stackId, String flowChainType) {
StateMachine<S, E> sm = stateMachineFactory.getStateMachine();
FlowEventListener<S, E> fl = (FlowEventListener<S, E>) applicationContext.getBean(FlowEventListener.class, getEdgeConfig().initState, getEdgeConfig().finalState, flowChainType, getClass().getSimpleName(), flowChainId, flowId, stackId);
Flow flow = new FlowAdapter<>(flowId, sm, new MessageFactory<>(), new StateConverterAdapter<>(stateType), new EventConverterAdapter<>(eventType), (Class<? extends FlowConfiguration<E>>) getClass(), fl);
sm.addStateListener(fl);
return flow;
}
Aggregations