use of org.mule.runtime.core.api.construct.Flow.builder in project mule by mulesoft.
the class DefaultFlowFactoryBean method getObject.
@Override
public Flow getObject() throws Exception {
Builder flowBuilder = Flow.builder(name, muleContext).messagingExceptionHandler(exceptionListener).initialState(initialState);
flowBuilder.processors(messageProcessors != null ? messageProcessors : emptyList());
if (messageSource != null) {
flowBuilder.source(messageSource);
}
if (processingStrategyFactory != null) {
flowBuilder.processingStrategyFactory(processingStrategyFactory);
}
if (maxConcurrency != null) {
flowBuilder.maxConcurrency(maxConcurrency.intValue());
}
final DefaultFlow build = (DefaultFlow) flowBuilder.build();
build.setAnnotations(getAnnotations());
return build;
}
Aggregations