use of org.apache.airavata.workflow.core.parser.JsonWorkflowParser in project airavata by apache.
the class WorkflowFactory method getWorkflowParser.
public static WorkflowParser getWorkflowParser(String workflowString) throws Exception {
WorkflowParser workflowParser = null;
try {
String wfParserClassName = ServerSettings.getWorkflowParser();
Class<?> aClass = Class.forName(wfParserClassName);
Constructor<?> constructor = aClass.getConstructor(String.class);
workflowParser = (WorkflowParser) constructor.newInstance(workflowString);
} catch (ApplicationSettingsException e) {
log.info("A custom workflow parser is not defined, Use default Airavata JSON workflow parser");
}
if (workflowParser == null) {
workflowParser = new JsonWorkflowParser(workflowString);
}
return workflowParser;
}
Aggregations