예제 #1
0
 private void validateOutgoingDefaultFlow() {
   Set<EdgeAdaptor> defaultFlows = new HashSet<EdgeAdaptor>(),
       conditionalFlows = new HashSet<EdgeAdaptor>();
   for (EdgeAdaptor edge : gateway.getOutgoingSequenceFlow()) {
     if (edge.isDefaultSequenceFlow()) {
       defaultFlows.add(edge);
     } else if (gateway.isDecisionGateway()) {
       conditionalFlows.add(edge);
     }
   }
   if (defaultFlows.size() > 1) {
     validator.addMessage("multipleDefaultFlows", gateway, defaultFlows);
   }
   if (!defaultFlows.isEmpty() && conditionalFlows.isEmpty() && !gateway.isDecisionGateway()) {
     validator.addMessage("defaultFlowFromGatewayWithNoDecision", gateway, defaultFlows);
   }
 }
예제 #2
0
 private void checkForOutgoingConditionalFlows() {
   if (gateway.isEventBasedGateway()) {
     return;
   }
   Set<EdgeAdaptor> conditionalFlows = new HashSet<EdgeAdaptor>();
   for (EdgeAdaptor edge : gateway.getOutgoingSequenceFlow()) {
     if (edge.isConditionalSequenceFlow()) {
       conditionalFlows.add(edge);
     }
   }
   if (!conditionalFlows.isEmpty()) {
     String messageID =
         gateway.isDecisionGateway()
             ? "conditionalFlowFromDecisionGateway"
             : "conditionalFlowFromParallelGateway";
     validator.addMessage(messageID, gateway, conditionalFlows);
   }
 }