Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.BoundaryEvent


    }
    return false;
  }

  public Object[] create(ICreateContext context) {
    BoundaryEvent boundaryEvent = new BoundaryEvent();
    TimerEventDefinition timerEvent = new TimerEventDefinition();
    boundaryEvent.getEventDefinitions().add(timerEvent);
   
    Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
    ((Activity) parentObject).getBoundaryEvents().add(boundaryEvent);
    boundaryEvent.setAttachedToRef((Activity) parentObject);
   
    addObjectToContainer(context, boundaryEvent, "Timer");

    // return newly created business object(s)
    return new Object[] { boundaryEvent };
View Full Code Here


    taskContext.setHeight(elementGraphics.getHeight());
    taskContext.setWidth(elementGraphics.getWidth());
   
    FlowNode oldObject = (FlowNode) getFeatureProvider().getBusinessObjectForPictogramElement(element);
    if (oldObject instanceof BoundaryEvent) {
      BoundaryEvent boundaryEvent = (BoundaryEvent) oldObject;
      ContainerShape parentShape = (ContainerShape) getFeatureProvider().getPictogramElementForBusinessObject(boundaryEvent.getAttachedToRef());
      taskContext.setTargetContainer(parentShape);
      taskContext.setLocation(x - parentShape.getGraphicsAlgorithm().getX(), y - parentShape.getGraphicsAlgorithm().getY());
    }
   
    List<SequenceFlow> sourceList = oldObject.getOutgoingFlows();
View Full Code Here

    }
    return false;
  }

  public Object[] create(ICreateContext context) {
    BoundaryEvent boundaryEvent = new BoundaryEvent();
    SignalEventDefinition signalEvent = new SignalEventDefinition();
    boundaryEvent.getEventDefinitions().add(signalEvent);

    Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
    ((Activity) parentObject).getBoundaryEvents().add(boundaryEvent);
    boundaryEvent.setAttachedToRef((Activity) parentObject);
   
    addObjectToContainer(context, boundaryEvent, "Signal");

    // return newly created business object(s)
    return new Object[] { boundaryEvent };
View Full Code Here

        FlowElement sourceElement = getFlowElementFromScope(sequenceFlow.getSourceRef(), parentScope);
        if (sourceElement != null) {
          sourceElement.addOutgoingFlow(sequenceFlow);
        }
      } else if (flowElement instanceof BoundaryEvent) {
        BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement;
        FlowElement attachedToElement = getFlowElementFromScope(boundaryEvent.getAttachedToRefId(), parentScope);
        if(attachedToElement != null) {
          boundaryEvent.setAttachedToRef((Activity) attachedToElement);
          ((Activity) attachedToElement).getBoundaryEvents().add(boundaryEvent);
        }
      } else if(flowElement instanceof SubProcess) {
        SubProcess subProcess = (SubProcess) flowElement;
        processFlowElements(subProcess.getFlowElements(), subProcess);
View Full Code Here

    }
    return false;
  }

  public Object[] create(ICreateContext context) {
    BoundaryEvent boundaryEvent = new BoundaryEvent();
    ErrorEventDefinition errorEvent = new ErrorEventDefinition();
    boundaryEvent.getEventDefinitions().add(errorEvent);

    Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
    ((Activity) parentObject).getBoundaryEvents().add(boundaryEvent);
    boundaryEvent.setAttachedToRef((Activity) parentObject);
   
    addObjectToContainer(context, boundaryEvent, "Error");

    // return newly created business object(s)
    return new Object[] { boundaryEvent };
View Full Code Here

    }
    return false;
  }

  public Object[] create(ICreateContext context) {
    BoundaryEvent boundaryEvent = new BoundaryEvent();
    MessageEventDefinition messageEvent = new MessageEventDefinition();
    boundaryEvent.getEventDefinitions().add(messageEvent);

    Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
    ((Activity) parentObject).getBoundaryEvents().add(boundaryEvent);
    boundaryEvent.setAttachedToRef((Activity) parentObject);

    addObjectToContainer(context, boundaryEvent, "Message");

    // return newly created business object(s)
    return new Object[] { boundaryEvent };
View Full Code Here

          }

        }

        if (flowElement instanceof BoundaryEvent) {
          BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement;
          if (boundaryEvent.getAttachedToRef() != null) {
            ContainerShape container = (ContainerShape) featureProvider.getPictogramElementForBusinessObject(boundaryEvent.getAttachedToRef());

            if (container != null) {
              AddContext boundaryContext = new AddContext(new AreaContext(), boundaryEvent);
              boundaryContext.setTargetContainer(container);
              Point location = getLocation(container);
View Full Code Here

      final Object parent = getBusinessObjectForPictogramElement(targetContainer);
     
      if (parent instanceof SubProcess) {
        boolean addToSubProcess = true;
        if (baseElement instanceof BoundaryEvent) {
          BoundaryEvent boundaryEvent = (BoundaryEvent) baseElement;
          if (boundaryEvent.getAttachedToRef() != null && boundaryEvent.getAttachedToRef().getId().equals(((SubProcess) parent).getId())) {
            addToSubProcess = false;
          }
        }
        if (addToSubProcess == false) {
          ContainerShape parentContainer = targetContainer.getContainer();
View Full Code Here

        cancelActivityCombo.select(0);
      }

      String messageRef = null;
      if (bo instanceof BoundaryEvent) {
        BoundaryEvent boundaryEvent = (BoundaryEvent) bo;
        if (boundaryEvent.getEventDefinitions().get(0) != null) {
          MessageEventDefinition messageDefinition = (MessageEventDefinition) boundaryEvent.getEventDefinitions().get(0);
          if (StringUtils.isNotEmpty(messageDefinition.getMessageRef())) {
            messageRef = messageDefinition.getMessageRef();
          }
        }
      }
View Full Code Here

    return ELEMENT_EVENT_BOUNDARY;
  }
 
  @Override
  protected BaseElement convertXMLToElement(XMLStreamReader xtr) {
    BoundaryEvent boundaryEvent = new BoundaryEvent();
   
    if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_BOUNDARY_CANCELACTIVITY))) {
      String cancelActivity = xtr.getAttributeValue(null, ATTRIBUTE_BOUNDARY_CANCELACTIVITY);
      if (ATTRIBUTE_VALUE_TRUE.equalsIgnoreCase(cancelActivity)) {
        boundaryEvent.setCancelActivity(true);
      }
    }
    boundaryEvent.setAttachedToRefId(xtr.getAttributeValue(null, ATTRIBUTE_BOUNDARY_ATTACHEDTOREF));
    parseChildElements(getXMLElementName(), boundaryEvent, xtr);
   
    // Explicitly set cancel activity to false for error boundary events
    if (boundaryEvent.getEventDefinitions().size() == 1) {
      EventDefinition eventDef = boundaryEvent.getEventDefinitions().get(0);
     
      if (eventDef instanceof ErrorEventDefinition) {
        boundaryEvent.setCancelActivity(false);
      }
    }
   
    return boundaryEvent;
  }
View Full Code Here

TOP

Related Classes of org.activiti.bpmn.model.BoundaryEvent

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.