Package org.eclipse.bpmn2

Examples of org.eclipse.bpmn2.Participant


    for (MessageFlow message : choreography.getMessageFlowRef()) {
      sources.add(message.getSourceRef());
    }

    for (ContainerShape band : ChoreographyUtil.getParticipantBandContainerShapes(choreographyContainer)) {
      Participant participant = BusinessObjectUtil.getFirstElementOfType(band, Participant.class);
      BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(band, BPMNShape.class);
      if (!sources.contains(participant) && bpmnShape.isIsMessageVisible()) {
        bpmnShape.setIsMessageVisible(false);
        peService.setPropertyValue(context.getPictogramElement(), MESSAGE_VISIBLE, Boolean.toString(false));
      } else if (sources.contains(participant) && !bpmnShape.isIsMessageVisible()) {
View Full Code Here


      ModelUtil.setID(createLaneSet);
    }

    try {
      ModelHandler handler = ModelHandler.getInstance(getDiagram());
      Participant sourceParticipant = handler.getParticipant(sourceLane);
      Participant targetParticipant = handler.getParticipant(targetLane);
      if (!sourceParticipant.equals(targetParticipant)) {
        handler.moveLane(movedLane, sourceParticipant, targetParticipant);
      }
    } catch (IOException e) {
      Activator.logError(e);
View Full Code Here

    }

    @Override
    public boolean isMoveAllowed(Object source, Object target) {
      try {
        Participant p = (Participant) target;
        if (p.equals(ModelHandler.getInstance(getDiagram()).getInternalParticipant())) {
          return true;
        }
        if (p.getProcessRef() == null) {
          return true;
        }
        if (p.getProcessRef().getLaneSets().isEmpty()) {
          return true;
        }
      } catch (Exception e) {
        Activator.logError(e);
      }
View Full Code Here

  public boolean canMoveShape(IMoveShapeContext context) {
    if (getMovedLane(context).getFlowNodeRefs().isEmpty()) {
      return true;
    }

    Participant p = (Participant) getBusinessObjectForPictogramElement(context.getTargetContainer());

    if (p.getProcessRef() == null) {
      return true;
    }

    if (!p.getProcessRef().getLaneSets().isEmpty()) {
      return true;
    }

    return false;
  }
View Full Code Here

      return e.getName();
    } else if (o instanceof TextAnnotation) {
      TextAnnotation a = (TextAnnotation) o;
      return a.getText();
    } else if (o instanceof Participant) {
      Participant p = (Participant) o;
      return p.getName();
    } else if (o instanceof Lane) {
      Lane l = (Lane) o;
      return l.getName();
    }
    return null;
View Full Code Here

//        definitions.setId(EcoreUtil.generateUUID());
        ModelUtil.setID(definitions,resource);
        Collaboration collaboration = FACTORY.createCollaboration();
//        collaboration.setId(EcoreUtil.generateUUID());
        ModelUtil.setID(collaboration,resource);
        Participant participant = FACTORY.createParticipant();
//        participant.setId(EcoreUtil.generateUUID());
        ModelUtil.setID(participant,resource);
        participant.setName("Internal");
        collaboration.getParticipants().add(participant);
        definitions.getRootElements().add(collaboration);

        domain.getCommandStack().execute(new RecordingCommand(domain) {
          @Override
View Full Code Here

    }
  }

  public Participant addParticipant() {
    Collaboration collaboration = getOrCreateCollaboration();
    Participant participant = FACTORY.createParticipant();
//    participant.setId(EcoreUtil.generateUUID());
    ModelUtil.setID(participant,resource);
    collaboration.getParticipants().add(participant);
    return participant;
  }
View Full Code Here

    return participant;
  }

  @Deprecated
  public void moveLane(Lane movedLane, Participant targetParticipant) {
    Participant sourceParticipant = getParticipant(movedLane);
    moveLane(movedLane, sourceParticipant, targetParticipant);
  }
View Full Code Here

    }
    return collaboration;
  }

  private void addCollaborationToRootElements(final List<RootElement> rootElements, final Collaboration collaboration) {
    Participant participant = FACTORY.createParticipant();
//    participant.setId(EcoreUtil.generateUUID());
    ModelUtil.setID(participant,resource);
    participant.setName("Internal");
    for (RootElement element : rootElements) {
      if (element instanceof Process) {
        participant.setProcessRef((Process) element);
        break;
      }
    }
    collaboration.getParticipants().add(participant);
    rootElements.add(collaboration);
View Full Code Here

        return true;
      }
      boolean different = false;
      try {
        ModelHandler handler = ModelHandler.getInstance(getDiagram());
        Participant sourceParticipant = handler.getParticipant(source);
        Participant targetParticipant = handler.getParticipant(target);
        different = !sourceParticipant.equals(targetParticipant);
      } catch (IOException e) {
        Activator.logError(e);
      }
      return different;
View Full Code Here

TOP

Related Classes of org.eclipse.bpmn2.Participant

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.