Examples of SequenceFlow


Examples of org.activiti.bpmn.model.SequenceFlow

  public void validateExclusiveGateway(Process process, ExclusiveGateway exclusiveGateway, List<ValidationError> errors) {
    if (exclusiveGateway.getOutgoingFlows().isEmpty()) {
      addError(errors, Problems.EXCLUSIVE_GATEWAY_NO_OUTGOING_SEQ_FLOW, process, exclusiveGateway,
          "Exclusive gateway has no outgoing sequence flow");
    } else if (exclusiveGateway.getOutgoingFlows().size() == 1) {
      SequenceFlow sequenceFlow = exclusiveGateway.getOutgoingFlows().get(0);
       if (StringUtils.isNotEmpty(sequenceFlow.getConditionExpression())) {
         addError(errors, Problems.EXCLUSIVE_GATEWAY_CONDITION_NOT_ALLOWED_ON_SINGLE_SEQ_FLOW, process, exclusiveGateway,
             "Exclusive gateway has only one outgoing sequence flow. This is not allowed to have a condition.");
      }
    } else {
      String defaultSequenceFlow = exclusiveGateway.getDefaultFlow();
View Full Code Here

Examples of org.activiti.bpmn.model.SequenceFlow

    process.addFlowElement(startEvent);
    UserTask task = new UserTask();
    task.setId("reviewTask");
    task.setAssignee("kermit");
    process.addFlowElement(task);
    SequenceFlow flow1 = new SequenceFlow();
    flow1.setId("flow1");
    flow1.setSourceRef("startEvent1");
    flow1.setTargetRef("reviewTask");
    process.addFlowElement(flow1);
    EndEvent endEvent = new EndEvent();
    endEvent.setId("endEvent1");
    process.addFlowElement(endEvent);
   
View Full Code Here

Examples of org.camunda.bpm.model.bpmn.instance.SequenceFlow

    super(modelInstance, element, selfType);
  }

  private SequenceFlowBuilder getCurrentSequenceFlowBuilder() {
    if (currentSequenceFlowBuilder == null) {
      SequenceFlow sequenceFlow = createSibling(SequenceFlow.class);
      currentSequenceFlowBuilder = sequenceFlow.builder();
    }
    return currentSequenceFlowBuilder;
  }
View Full Code Here

Examples of org.camunda.bpm.model.bpmn.instance.SequenceFlow

    super(modelInstance, element, selfType);
  }

  private SequenceFlowBuilder getCurrentSequenceFlowBuilder() {
    if (currentSequenceFlowBuilder == null) {
      SequenceFlow sequenceFlow = createSibling(SequenceFlow.class);
      currentSequenceFlowBuilder = sequenceFlow.builder();
    }
    return currentSequenceFlowBuilder;
  }
View Full Code Here

Examples of org.drools.bpmn2.core.SequenceFlow

      if (connections == null) {
        connections = new ArrayList<SequenceFlow>();
        ((CompositeNode) nodeContainer).setMetaData(ProcessHandler.CONNECTIONS, connections);
      }
    }
    SequenceFlow connection = new SequenceFlow(id, sourceRef, targetRef);
    connection.setBendpoints(bendpoints);
    connection.setName(name);
   
    connections.add(connection);

    return connection;
  }
View Full Code Here

Examples of org.drools.bpmn2.core.SequenceFlow

  }

  public Object end(final String uri, final String localName,
                final ExtensibleXmlParser parser) throws SAXException {
    final Element element = parser.endElementBuilder();
    SequenceFlow sequenceFlow = (SequenceFlow) parser.getCurrent();
       
    org.w3c.dom.Node xmlNode = element.getFirstChild();
        while (xmlNode != null) {
          String nodeName = xmlNode.getNodeName();
          if ("conditionExpression".equals(nodeName)) {
            String expression = xmlNode.getTextContent();
            org.w3c.dom.Node languageNode = xmlNode.getAttributes().getNamedItem("language");
            if (languageNode != null) {
              String language = languageNode.getNodeValue();
              if (XmlBPMNProcessDumper.JAVA_LANGUAGE.equals(language)) {
                sequenceFlow.setLanguage("java");
              } else if (XmlBPMNProcessDumper.RULE_LANGUAGE.equals(language)) {
                sequenceFlow.setType("rule");
              } else if (XmlBPMNProcessDumper.XPATH_LANGUAGE.equals(language)) {
                        sequenceFlow.setLanguage("XPath");
                    } else {
                  throw new IllegalArgumentException("Unknown language " + language);
              }
            }
            sequenceFlow.setExpression(expression);
          }
          xmlNode = xmlNode.getNextSibling();
        }
        return sequenceFlow;
  }
View Full Code Here

Examples of org.drools.bpmn2.core.SequenceFlow

      if (connections == null) {
        connections = new ArrayList<SequenceFlow>();
        ((CompositeNode) nodeContainer).setMetaData(ProcessHandler.CONNECTIONS, connections);
      }
    }
    SequenceFlow connection = new SequenceFlow(id, sourceRef, targetRef);
    connection.setBendpoints(bendpoints);
    connection.setName(name);
   
    connections.add(connection);

    return connection;
  }
View Full Code Here

Examples of org.drools.bpmn2.core.SequenceFlow

  }

  public Object end(final String uri, final String localName,
                final ExtensibleXmlParser parser) throws SAXException {
    final Element element = parser.endElementBuilder();
    SequenceFlow sequenceFlow = (SequenceFlow) parser.getCurrent();
       
    org.w3c.dom.Node xmlNode = element.getFirstChild();
        while (xmlNode != null) {
          String nodeName = xmlNode.getNodeName();
          if ("conditionExpression".equals(nodeName)) {
            String expression = xmlNode.getTextContent();
            org.w3c.dom.Node languageNode = xmlNode.getAttributes().getNamedItem("language");
            if (languageNode != null) {
              String language = languageNode.getNodeValue();
              if (XmlBPMNProcessDumper.JAVA_LANGUAGE.equals(language)) {
                sequenceFlow.setLanguage("java");
              } else if (XmlBPMNProcessDumper.RULE_LANGUAGE.equals(language)) {
                sequenceFlow.setType("rule");
              } else if (XmlBPMNProcessDumper.XPATH_LANGUAGE.equals(language)) {
                        sequenceFlow.setLanguage("XPath");
                    } else {
                  throw new IllegalArgumentException("Unknown language " + language);
              }
            }
            sequenceFlow.setExpression(expression);
          }
          xmlNode = xmlNode.getNextSibling();
        }
        return sequenceFlow;
  }
View Full Code Here

Examples of org.eclipse.bpmn2.SequenceFlow

        assertTrue(process.getFlowElements().get(0) instanceof Task);
        Task task = (Task) process.getFlowElements().get(0);
        assertEquals("task1", task.getName());
        Task task2 = (Task) process.getFlowElements().get(1);
        assertEquals("task2", task2.getName());
        SequenceFlow flow = (SequenceFlow) process.getFlowElements().get(2);
        assertEquals("seqFlow", flow.getName());
        assertEquals(task, flow.getSourceRef());
        assertEquals(task2, flow.getTargetRef());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.SequenceFlow

                if(root instanceof Process) {
                    Process process = (Process) root;
                    List<FlowElement> flowElements = process.getFlowElements();
                    for(FlowElement fe : flowElements) {
                        if(fe instanceof SequenceFlow) {
                            SequenceFlow sf = (SequenceFlow) fe;
                            if(sequenceFlowMapping.containsKey(sf.getId())) {
                                sf.setSourceRef(getFlowNode(def, sequenceFlowMapping.get(sf.getId()).get("sourceRef")));
                                sf.setTargetRef(getFlowNode(def, sequenceFlowMapping.get(sf.getId()).get("targetRef")));
                            } else {
                                _logger.error("Could not find mapping for sequenceFlow: " + sf.getId());
                            }
                        }
                    }
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.