use of org.mule.runtime.module.extension.internal.runtime.operation.OperationMessageProcessorBuilder in project mule by mulesoft.
the class DefaultExtensionsClient method createProcessor.
/**
* Creates a new {@link OperationMessageProcessor} for the required operation and parses all the parameters passed by the client
* user.
*/
private OperationMessageProcessor createProcessor(String extensionName, String operationName, OperationParameters parameters) {
ExtensionModel extension = findExtension(extensionName);
OperationModel operation = findOperation(extension, operationName);
ConfigurationProvider config = parameters.getConfigName().map(this::findConfiguration).orElse(null);
Map<String, ValueResolver> resolvedParams = resolveParameters(parameters.get(), getEvent());
try {
OperationMessageProcessor processor = new OperationMessageProcessorBuilder(extension, operation, policyManager, muleContext, registry).setConfigurationProvider(config).setParameters(resolvedParams).build();
initialiseIfNeeded(processor, muleContext);
processor.start();
return processor;
} catch (Exception e) {
throw new MuleRuntimeException(createStaticMessage("Could not create Operation Message Processor"), e);
}
}
Aggregations