Package org.eclipse.bpmn2

Examples of org.eclipse.bpmn2.Participant


    public void testEndMultipleEventUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("endMultipleEvent.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        EndEvent g = (EndEvent) process.getFlowElements().get(0);
        assertEquals("end multiple event", g.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here


    public void testEndCompensationEventUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("endCompensationEvent.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        EndEvent g = (EndEvent) process.getFlowElements().get(0);
        assertEquals("end compensation event", g.getName());
        assertTrue(g.getEventDefinitions().iterator().next() instanceof CompensateEventDefinition);
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.PARTICIPANT: {
            Participant participant = (Participant) theEObject;
            T result = caseParticipant(participant);
            if (result == null)
                result = caseBaseElement(participant);
            if (result == null)
                result = caseInteractionNode(participant);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setInnerParticipantRef(Participant newInnerParticipantRef) {
        Participant oldInnerParticipantRef = innerParticipantRef;
        innerParticipantRef = newInnerParticipantRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.PARTICIPANT_ASSOCIATION__INNER_PARTICIPANT_REF,
                    oldInnerParticipantRef, innerParticipantRef));
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setOuterParticipantRef(Participant newOuterParticipantRef) {
        Participant oldOuterParticipantRef = outerParticipantRef;
        outerParticipantRef = newOuterParticipantRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.PARTICIPANT_ASSOCIATION__OUTER_PARTICIPANT_REF,
                    oldOuterParticipantRef, outerParticipantRef));
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setInitiatingParticipantRef(Participant newInitiatingParticipantRef) {
        Participant oldInitiatingParticipantRef = initiatingParticipantRef;
        initiatingParticipantRef = newInitiatingParticipantRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.GLOBAL_CHOREOGRAPHY_TASK__INITIATING_PARTICIPANT_REF,
                    oldInitiatingParticipantRef, initiatingParticipantRef));
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setInitiatingParticipantRef(Participant newInitiatingParticipantRef) {
        Participant oldInitiatingParticipantRef = initiatingParticipantRef;
        initiatingParticipantRef = newInitiatingParticipantRef;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.CHOREOGRAPHY_ACTIVITY__INITIATING_PARTICIPANT_REF,
                    oldInitiatingParticipantRef, initiatingParticipantRef));
View Full Code Here

    }
    Iterator<Participant> iterator = choreography.getParticipantRefs().iterator();
    String delim = ":";
    StringBuilder sb = new StringBuilder();
    while (iterator.hasNext()) {
      Participant participant = iterator.next();
      sb.append(participant.getId());
      if (iterator.hasNext()) {
        sb.append(delim);
      }
    }
    return sb.toString();
View Full Code Here

      }
    }

    Iterator<Participant> iterator = newParticipants.iterator();
    while (iterator.hasNext()) {
      Participant participant = iterator.next();

      ContainerShape bandShape = peService.createContainerShape(choreographyContainer, true);

      ParticipantBandKind bandKind = getNewParticipantBandKind(choreography, participant, first,
          !iterator.hasNext());

      boolean multiple = participant.getParticipantMultiplicity() != null
          && participant.getParticipantMultiplicity().getMaximum() > 1;

      int w = size.getWidth();
      int h = multiple ? 40 : 20;

      BPMNShape bpmnShape = DIUtils.createDIShape(bandShape, participant, 0, y + h, w, h, fp, diagram);
View Full Code Here

    band.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
    band.setBackground(initiating ? gaService.manageColor(diagram, IColorConstant.WHITE) : gaService.manageColor(
        diagram, IColorConstant.LIGHT_GRAY));
    gaService.setLocationAndSize(band, 0, 0, w, h);

    Participant p = (Participant) bpmnShape.getBpmnElement();
    if (showNames) {
      addBandLabel(bandShape, p.getName(), w, h);
    }
    AnchorUtil.addFixedPointAnchors(bandShape, band);
    peService.setPropertyValue(bandShape, ChoreographyProperties.BAND, Boolean.toString(true));
    peService.setPropertyValue(bandShape, ChoreographyProperties.MESSAGE_VISIBLE,
        Boolean.toString(bpmnShape.isIsMessageVisible()));
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.