Search in sources :

Example 1 with FlowAdapter

use of com.sequenceiq.flow.core.FlowAdapter 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;
}
Also used : FlowAdapter(com.sequenceiq.flow.core.FlowAdapter) FlowEventListener(com.sequenceiq.flow.core.FlowEventListener) Flow(com.sequenceiq.flow.core.Flow)

Aggregations

Flow (com.sequenceiq.flow.core.Flow)1 FlowAdapter (com.sequenceiq.flow.core.FlowAdapter)1 FlowEventListener (com.sequenceiq.flow.core.FlowEventListener)1