Search in sources :

Example 1 with SemanticModules

use of io.automatiko.engine.workflow.compiler.xml.SemanticModules in project automatiko-engine by automatiko-io.

the class XmlBPMNProcessDumper method readProcess.

@Override
public Process readProcess(String processXml) {
    SemanticModules semanticModules = new SemanticModules();
    semanticModules.addSemanticModule(new BPMNSemanticModule());
    semanticModules.addSemanticModule(new BPMNExtensionsSemanticModule());
    semanticModules.addSemanticModule(new BPMNDISemanticModule());
    XmlProcessReader xmlReader = new XmlProcessReader(semanticModules, Thread.currentThread().getContextClassLoader());
    try {
        List<Process> processes = xmlReader.read(new StringReader(processXml));
        return processes.get(0);
    } catch (Throwable t) {
        t.printStackTrace();
        return null;
    }
}
Also used : SemanticModules(io.automatiko.engine.workflow.compiler.xml.SemanticModules) XmlProcessReader(io.automatiko.engine.workflow.compiler.xml.XmlProcessReader) StringReader(java.io.StringReader) Process(io.automatiko.engine.api.definition.process.Process) WorkflowProcess(io.automatiko.engine.api.definition.process.WorkflowProcess) ExecutableProcess(io.automatiko.engine.workflow.process.executable.core.ExecutableProcess)

Aggregations

Process (io.automatiko.engine.api.definition.process.Process)1 WorkflowProcess (io.automatiko.engine.api.definition.process.WorkflowProcess)1 SemanticModules (io.automatiko.engine.workflow.compiler.xml.SemanticModules)1 XmlProcessReader (io.automatiko.engine.workflow.compiler.xml.XmlProcessReader)1 ExecutableProcess (io.automatiko.engine.workflow.process.executable.core.ExecutableProcess)1 StringReader (java.io.StringReader)1