use of io.automatiko.engine.workflow.serverless.parser.ServerlessWorkflowParser in project automatiko-engine by automatiko-io.
the class ServerlessProcess method from.
public static List<ServerlessProcess> from(ProcessConfig config, Resource... resources) {
List<ServerlessProcess> compiled = new ArrayList<>();
ServerlessWorkflowParser parser = new ServerlessWorkflowParser();
for (Resource resource : resources) {
try {
compiled.add(new ServerlessProcess(parser.parse(resource.getReader()), config));
} catch (IOException e) {
e.printStackTrace();
}
}
return compiled;
}
use of io.automatiko.engine.workflow.serverless.parser.ServerlessWorkflowParser in project automatiko-engine by automatiko-io.
the class ProcessCodegen method parseWorkflowFile.
private static Process parseWorkflowFile(Resource r, String parser) {
try {
ServerlessWorkflowParser workflowParser = new ServerlessWorkflowParser();
Process p = workflowParser.parse(r.getReader());
((WorkflowProcess) p).getMetaData().put("IsServerlessWorkflow", true);
p.setResource(r);
return p;
} catch (IOException e) {
throw new ProcessParsingException("Could not parse file " + r.getSourcePath(), e);
}
}
Aggregations