private List<EdgeAdaptor> getMessageFlowList() {
   if (messageEvent.isThrowingMessageEvent()) {
     return model.getOutgoingEdges(MessageFlow.class, messageEvent);
   } else {
     return model.getIncomingEdges(MessageFlow.class, messageEvent);
   }
 }
 public void doValidation() {
   if (!model.isColaboration()) return;
   List<EdgeAdaptor> messages = getMessageFlowList();
   List<EdgeAdaptor> conversationLinks = messageEvent.getAdjacentEdges(ConversationLink.class);
   if (messages.isEmpty() && conversationLinks.isEmpty()) {
     reportNoMessages(); // @todo: Validation needs to be refined for main process events!
   } else if (messages.size() + conversationLinks.size() > 1) {
     reportTooManyMessages(messages);
   }
 }
 private void checkForNeedlessness() {
   if (model.getIncomingEdges(SequenceFlow.class, gateway).size() <= 1
       && model.getOutgoingEdges(SequenceFlow.class, gateway).size() <= 1) {
     validator.addMessage("uselessGateway", gateway);
   }
 }
Exemple #4
0
 public Mapping(ModelAdaptor model) {
   this.nodes = model.getNodes();
   this.edges = model.getEdges();
   this.model = model;
   this.createMapping();
 }