use of org.wso2.carbon.apimgt.core.models.WorkflowConfigProperties in project carbon-apimgt by wso2.
the class WorkflowConfigHolder method loadProperties.
private void loadProperties(List<WorkflowConfigProperties> properties, WorkflowExecutor workFlowExecutor) throws WorkflowException {
for (Iterator iterator = properties.iterator(); iterator.hasNext(); ) {
WorkflowConfigProperties workflowConfigProperties = (WorkflowConfigProperties) iterator.next();
String propertyName = workflowConfigProperties.getName();
String propertyValue = workflowConfigProperties.getValue();
if (propertyName == null) {
handleException("An Executor class property must specify the name attribute");
} else {
setInstanceProperty(propertyName, propertyValue, workFlowExecutor);
}
}
}
use of org.wso2.carbon.apimgt.core.models.WorkflowConfigProperties in project carbon-apimgt by wso2.
the class WorkflowConfigHolder method loadWorkflowConfigurations.
private void loadWorkflowConfigurations(WorkflowExecutorInfo workflowConfig, String workflowExecutorType) throws ClassNotFoundException, IllegalAccessException, InstantiationException, WorkflowException {
String executorClass = workflowConfig.getExecutor();
Class clazz = WorkflowConfigHolder.class.getClassLoader().loadClass(executorClass);
WorkflowExecutor workFlowExecutor = (WorkflowExecutor) clazz.newInstance();
List<WorkflowConfigProperties> properties = workflowConfig.getProperty();
if (properties != null) {
loadProperties(properties, workFlowExecutor);
}
workflowExecutorMap.put(workflowExecutorType, workFlowExecutor);
}
Aggregations