class WorkflowEngineFactoryImpl implements WorkflowEngineFactory, InitializingBean {

    @SuppressWarnings("unchecked")
    @Override
    public <E extends WorkflowEngine> E newEngine(OrchestrationConfig config) {
        switch (config.getCapability()) {
            case STANDARD:
                return (E) new StandardWorkflowEngine(routeNodeService, routeHeaderService, parameterService, config);
            case BLANKET_APPROVAL:
                return (E) new BlanketApproveEngine(routeNodeService, routeHeaderService, parameterService, config);
            case SIMULATION:
                return (E) new SimulationEngine(routeNodeService, routeHeaderService, parameterService, config);
        }
        
        return null;
    }

}