Package org.drools.bpmn2.legacy.beta1.di

Examples of org.drools.bpmn2.legacy.beta1.di.SequenceFlowConnectorHandler$ConnectionInfo


    super("http://bpmndi.org");
   
    addHandler("processDiagram", new ProcessDiagramHandler());
    addHandler("eventShape", new EventShapeHandler());
        addHandler("gatewayShape", new GatewayShapeHandler());
        addHandler("activityShape", new ActivityShapeHandler());
        addHandler("sequenceFlowConnector", new SequenceFlowConnectorHandler());
  }
View Full Code Here


 
  public BPMNDISemanticModule() {
    super("http://bpmndi.org");
   
    addHandler("processDiagram", new ProcessDiagramHandler());
    addHandler("eventShape", new EventShapeHandler());
        addHandler("gatewayShape", new GatewayShapeHandler());
        addHandler("activityShape", new ActivityShapeHandler());
        addHandler("sequenceFlowConnector", new SequenceFlowConnectorHandler());
  }
View Full Code Here

  public BPMNDISemanticModule() {
    super("http://bpmndi.org");
   
    addHandler("processDiagram", new ProcessDiagramHandler());
    addHandler("eventShape", new EventShapeHandler());
        addHandler("gatewayShape", new GatewayShapeHandler());
        addHandler("activityShape", new ActivityShapeHandler());
        addHandler("sequenceFlowConnector", new SequenceFlowConnectorHandler());
  }
View Full Code Here

public class BPMNDISemanticModule extends DefaultSemanticModule {
 
  public BPMNDISemanticModule() {
    super("http://bpmndi.org");
   
    addHandler("processDiagram", new ProcessDiagramHandler());
    addHandler("eventShape", new EventShapeHandler());
        addHandler("gatewayShape", new GatewayShapeHandler());
        addHandler("activityShape", new ActivityShapeHandler());
        addHandler("sequenceFlowConnector", new SequenceFlowConnectorHandler());
  }
View Full Code Here

        NodeInfo nodeInfo = new NodeInfo(id, eventRef);
        nodeInfo.setX(new Float(x).intValue());
        nodeInfo.setY(new Float(y).intValue());
        nodeInfo.setWidth(new Float(width).intValue());
        nodeInfo.setHeight(new Float(height).intValue());
        ProcessInfo processInfo = (ProcessInfo) parser.getParent();
        processInfo.addNodeInfo(nodeInfo);
        return nodeInfo;
    }
View Full Code Here

        ConnectionInfo info = new ConnectionInfo(sequenceFlowRef);
        final String sourceRef = attrs.getValue("sourceRef");
        final String targetRef = attrs.getValue("targetRef");
        info.setSourceRef(sourceRef);
        info.setTargetRef(targetRef);
        ProcessInfo processInfo = (ProcessInfo) parser.getParent();
        processInfo.addConnectionInfo(info);
        return info;
    }
View Full Code Here

   
    addHandler("processDiagram", new ProcessDiagramHandler());
    addHandler("eventShape", new EventShapeHandler());
        addHandler("gatewayShape", new GatewayShapeHandler());
        addHandler("activityShape", new ActivityShapeHandler());
        addHandler("sequenceFlowConnector", new SequenceFlowConnectorHandler());
  }
View Full Code Here

                    "Could not find node " + nodeInfo.getNodeRef());
            }
        }
        for (ConnectionInfo connectionInfo: processInfo.getConnectionInfos()) {
            if (connectionInfo.getBendpoints() != null) {
                NodeInfo sourceNodeInfo = processInfo.getNodeInfo(connectionInfo.getSourceRef());
                if (sourceNodeInfo == null) {
                    throw new IllegalArgumentException(
                        "Could not find sourceRef for connection info: " + connectionInfo.getSourceRef());
                }
                NodeInfo targetNodeInfo = processInfo.getNodeInfo(connectionInfo.getTargetRef());
                if (targetNodeInfo == null) {
                    throw new IllegalArgumentException(
                        "Could not find sourceRef for connection info: " + connectionInfo.getTargetRef());
                }
                Node sourceNode = null;
                for (Node node: process.getNodes()) {
                    String id = (String) XmlBPMNProcessDumper.getUniqueNodeId(node);
                    if (sourceNodeInfo.getNodeRef().equals(id)) {
                        sourceNode = node;
                        break;
                    }
                }
                if (sourceNode == null) {
                    throw new IllegalArgumentException(
                        "Could not find node for nodeRef: " + sourceNodeInfo.getNodeRef());
                }
                boolean found = false;
                for (List<Connection> outgoingConnections: sourceNode.getOutgoingConnections().values()) {
                    for (Connection connection: outgoingConnections) {
                        if (targetNodeInfo.getNodeRef().equals(XmlBPMNProcessDumper.getUniqueNodeId(connection.getTo()))) {
                            ((ConnectionImpl) connection).setMetaData(
                                "bendpoints", connectionInfo.getBendpoints());
                            found = true;
                            break;
                        }
                    }
                    if (found) {
                        break;
                    }
                }
                if (!found) {
                    throw new IllegalArgumentException(
                        "Could not find connection from  " + sourceNodeInfo.getNodeRef() +
                        " to " + targetNodeInfo.getNodeRef());
                }
            }
        }
        return processInfo;
    }
View Full Code Here

    public void testAdHocSubProcess() throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
        ((PackageBuilderConfiguration) conf).addDialect("XPath", new XPathDialectConfiguration());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules());
    RuleFlowProcess p = (RuleFlowProcess)
        processReader.read(SimpleBPMNProcessTest.class.getResourceAsStream("/BPMN2-AdHocSubProcess.xml"));
View Full Code Here

    public void testAdHocSubProcessAutoComplete() throws Exception {
    KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
    ((PackageBuilderConfiguration) conf).initSemanticModules();
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNSemanticModule());
    ((PackageBuilderConfiguration) conf).addSemanticModule(new BPMNDISemanticModule());
        ((PackageBuilderConfiguration) conf).addDialect("XPath", new XPathDialectConfiguration());
    XmlProcessReader processReader = new XmlProcessReader(
          ((PackageBuilderConfiguration) conf).getSemanticModules());
    RuleFlowProcess p = (RuleFlowProcess)
        processReader.read(SimpleBPMNProcessTest.class.getResourceAsStream("/BPMN2-AdHocSubProcessAutoComplete.xml"));
View Full Code Here

TOP

Related Classes of org.drools.bpmn2.legacy.beta1.di.SequenceFlowConnectorHandler$ConnectionInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.