Search in sources :

Example 1 with NodeInfo

use of io.automatiko.engine.workflow.bpmn2.xml.di.BPMNShapeHandler.NodeInfo in project kogito-runtimes by kiegroup.

the class BPMNPlaneHandler method end.

public Object end(final String uri, final String localName, final ExtensibleXmlParser parser) throws SAXException {
    parser.endElementBuilder();
    ProcessInfo processInfo = (ProcessInfo) parser.getCurrent();
    List<Process> processes = ((ProcessBuildData) parser.getData()).getProcesses();
    RuleFlowProcess process = null;
    for (Process p : processes) {
        if (p.getId() != null && p.getId().equals(processInfo.getProcessRef())) {
            process = (RuleFlowProcess) p;
            break;
        }
    }
    if (process != null) {
        for (NodeInfo nodeInfo : processInfo.getNodeInfos()) {
            processNodeInfo(nodeInfo, process.getNodes());
        }
        postProcessNodeOffset(process.getNodes(), 0, 0);
        for (ConnectionInfo connectionInfo : processInfo.getConnectionInfos()) {
            if (connectionInfo.getBendpoints() != null) {
                processConnectionInfo(connectionInfo, process.getNodes());
            }
        }
    }
    return processInfo;
}
Also used : RuleFlowProcess(org.jbpm.ruleflow.core.RuleFlowProcess) ProcessBuildData(org.jbpm.compiler.xml.ProcessBuildData) NodeInfo(org.jbpm.bpmn2.xml.di.BPMNShapeHandler.NodeInfo) Process(org.kie.api.definition.process.Process) RuleFlowProcess(org.jbpm.ruleflow.core.RuleFlowProcess) ConnectionInfo(org.jbpm.bpmn2.xml.di.BPMNEdgeHandler.ConnectionInfo)

Example 2 with NodeInfo

use of io.automatiko.engine.workflow.bpmn2.xml.di.BPMNShapeHandler.NodeInfo in project jbpm by kiegroup.

the class BPMNPlaneHandler method end.

public Object end(final String uri, final String localName, final ExtensibleXmlParser parser) throws SAXException {
    parser.endElementBuilder();
    ProcessInfo processInfo = (ProcessInfo) parser.getCurrent();
    List<Process> processes = ((ProcessBuildData) parser.getData()).getProcesses();
    RuleFlowProcess process = null;
    for (Process p : processes) {
        if (p.getId() != null && p.getId().equals(processInfo.getProcessRef())) {
            process = (RuleFlowProcess) p;
            break;
        }
    }
    if (process != null) {
        for (NodeInfo nodeInfo : processInfo.getNodeInfos()) {
            processNodeInfo(nodeInfo, process.getNodes());
        }
        postProcessNodeOffset(process.getNodes(), 0, 0);
        for (ConnectionInfo connectionInfo : processInfo.getConnectionInfos()) {
            if (connectionInfo.getBendpoints() != null) {
                processConnectionInfo(connectionInfo, process.getNodes());
            }
        }
    }
    return processInfo;
}
Also used : RuleFlowProcess(org.jbpm.ruleflow.core.RuleFlowProcess) ProcessBuildData(org.jbpm.compiler.xml.ProcessBuildData) NodeInfo(org.jbpm.bpmn2.xml.di.BPMNShapeHandler.NodeInfo) Process(org.kie.api.definition.process.Process) RuleFlowProcess(org.jbpm.ruleflow.core.RuleFlowProcess) ConnectionInfo(org.jbpm.bpmn2.xml.di.BPMNEdgeHandler.ConnectionInfo)

Example 3 with NodeInfo

use of io.automatiko.engine.workflow.bpmn2.xml.di.BPMNShapeHandler.NodeInfo in project automatiko-engine by automatiko-io.

the class BPMNPlaneHandler method end.

public Object end(final String uri, final String localName, final ExtensibleXmlParser parser) throws SAXException {
    parser.endElementBuilder();
    ProcessInfo processInfo = (ProcessInfo) parser.getCurrent();
    List<Process> processes = ((ProcessBuildData) parser.getData()).getProcesses();
    ExecutableProcess process = null;
    for (Process p : processes) {
        if (p.getId() != null && p.getId().equals(processInfo.getProcessRef())) {
            process = (ExecutableProcess) p;
            break;
        }
    }
    if (process != null) {
        for (NodeInfo nodeInfo : processInfo.getNodeInfos()) {
            processNodeInfo(nodeInfo, process.getNodes());
        }
        postProcessNodeOffset(process.getNodes(), 0, 0);
        for (ConnectionInfo connectionInfo : processInfo.getConnectionInfos()) {
            if (connectionInfo.getBendpoints() != null) {
                processConnectionInfo(connectionInfo, process.getNodes());
            }
        }
    }
    return processInfo;
}
Also used : ProcessBuildData(io.automatiko.engine.workflow.compiler.xml.ProcessBuildData) NodeInfo(io.automatiko.engine.workflow.bpmn2.xml.di.BPMNShapeHandler.NodeInfo) ExecutableProcess(io.automatiko.engine.workflow.process.executable.core.ExecutableProcess) Process(io.automatiko.engine.api.definition.process.Process) ExecutableProcess(io.automatiko.engine.workflow.process.executable.core.ExecutableProcess) ConnectionInfo(io.automatiko.engine.workflow.bpmn2.xml.di.BPMNEdgeHandler.ConnectionInfo)

Example 4 with NodeInfo

use of io.automatiko.engine.workflow.bpmn2.xml.di.BPMNShapeHandler.NodeInfo in project automatiko-engine by automatiko-io.

the class BPMNShapeHandler method start.

public Object start(final String uri, final String localName, final Attributes attrs, final ExtensibleXmlParser parser) throws SAXException {
    parser.startElementBuilder(localName, attrs);
    final String elementRef = attrs.getValue("bpmnElement");
    NodeInfo nodeInfo = new NodeInfo(elementRef);
    ProcessInfo processInfo = (ProcessInfo) parser.getParent();
    processInfo.addNodeInfo(nodeInfo);
    return nodeInfo;
}
Also used : ProcessInfo(io.automatiko.engine.workflow.bpmn2.xml.di.BPMNPlaneHandler.ProcessInfo)

Aggregations

ConnectionInfo (org.jbpm.bpmn2.xml.di.BPMNEdgeHandler.ConnectionInfo)2 NodeInfo (org.jbpm.bpmn2.xml.di.BPMNShapeHandler.NodeInfo)2 ProcessBuildData (org.jbpm.compiler.xml.ProcessBuildData)2 RuleFlowProcess (org.jbpm.ruleflow.core.RuleFlowProcess)2 Process (org.kie.api.definition.process.Process)2 Process (io.automatiko.engine.api.definition.process.Process)1 ConnectionInfo (io.automatiko.engine.workflow.bpmn2.xml.di.BPMNEdgeHandler.ConnectionInfo)1 ProcessInfo (io.automatiko.engine.workflow.bpmn2.xml.di.BPMNPlaneHandler.ProcessInfo)1 NodeInfo (io.automatiko.engine.workflow.bpmn2.xml.di.BPMNShapeHandler.NodeInfo)1 ProcessBuildData (io.automatiko.engine.workflow.compiler.xml.ProcessBuildData)1 ExecutableProcess (io.automatiko.engine.workflow.process.executable.core.ExecutableProcess)1