Examples of FlowElementsContainer


Examples of org.activiti.bpmn.model.FlowElementsContainer

      if (target == null) {
        addError(errors, Problems.SEQ_FLOW_INVALID_TARGET, process, sequenceFlow, "Invalid target for sequenceflow");
      }
     
      if (source != null && target != null) {
        FlowElementsContainer sourceContainer = process.getFlowElementsContainerRecursive(source.getId());
        FlowElementsContainer targetContainer = process.getFlowElementsContainerRecursive(target.getId());
       
        if (sourceContainer == null) {
          addError(errors, Problems.SEQ_FLOW_INVALID_SRC, process, sequenceFlow, "Invalid source for sequenceflow");
        }
        if (targetContainer == null) {
View Full Code Here

Examples of org.activiti.bpmn.model.FlowElementsContainer

        EventDefinition eventDefinition = endEvent.getEventDefinitions().get(0);
       
        // Error end event
        if (eventDefinition instanceof CancelEventDefinition) {
         
          FlowElementsContainer parent = process.findParent(endEvent);
          if (!(parent instanceof Transaction)) {
            addError(errors, Problems.END_EVENT_CANCEL_ONLY_INSIDE_TRANSACTION, process, endEvent, "end event with cancelEventDefinition only supported inside transaction subprocess");
          }
         
        }
View Full Code Here

Examples of org.eclipse.bpmn2.FlowElementsContainer

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.FLOW_ELEMENTS_CONTAINER: {
            FlowElementsContainer flowElementsContainer = (FlowElementsContainer) theEObject;
            T result = caseFlowElementsContainer(flowElementsContainer);
            if (result == null)
                result = caseBaseElement(flowElementsContainer);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here

Examples of org.eclipse.bpmn2.FlowElementsContainer

   * @param elem
   *            flow element to be added
   * @return
   */
  public <T extends FlowElement> T addFlowElement(Object target, T elem) {
    FlowElementsContainer container = getFlowElementContainer(target);
    container.getFlowElements().add(elem);
    return elem;
  }
View Full Code Here

Examples of org.eclipse.bpmn2.FlowElementsContainer

    }
    return process.getIoSpecification();
  }

  public void moveFlowNode(FlowNode node, Object source, Object target) {
    FlowElementsContainer sourceContainer = getFlowElementContainer(source);
    FlowElementsContainer targetContainer = getFlowElementContainer(target);
    sourceContainer.getFlowElements().remove(node);
    targetContainer.getFlowElements().add(node);
    for (SequenceFlow flow : node.getOutgoing()) {
      sourceContainer.getFlowElements().remove(flow);
      targetContainer.getFlowElements().add(flow);
    }
  }
View Full Code Here

Examples of org.eclipse.bpmn2.FlowElementsContainer

  public Lane createLane(Object target) {
    Lane lane = FACTORY.createLane();
//    lane.setId(EcoreUtil.generateUUID());
    ModelUtil.setID(lane,resource);
    FlowElementsContainer container = getFlowElementContainer(target);
    if (container.getLaneSets().isEmpty()) {
      LaneSet laneSet = FACTORY.createLaneSet();
//      laneSet.setId(EcoreUtil.generateUUID());
      container.getLaneSets().add(laneSet);
    }
    container.getLaneSets().get(0).getLanes().add(lane);
    ModelUtil.setID(lane);
    return lane;
  }
View Full Code Here

Examples of org.eclipse.bpmn2.FlowElementsContainer

                } else {
                    if (child instanceof SequenceFlow) {
                        // for some reason sequence flows are placed as root elements.
                        // find if the target has a container, and if we can use it:
                        List<String> ids = _outgoingFlows.get(child);
                        FlowElementsContainer container = null;
                        for (String id : ids) { // yes, we iterate, but we'll take the first in the list that will work.
                            Object obj = _idMap.get(id);
                            if (obj instanceof EObject && ((EObject) obj).eContainer() instanceof FlowElementsContainer) {
                                container = (FlowElementsContainer) ((EObject) obj).eContainer();
                                break;
                            }
                        }
                        if (container != null) {
                            container.getFlowElements().add((SequenceFlow) child);
                            continue;
                        }
                       
                    }
                    if (child instanceof Task || child instanceof SequenceFlow
View Full Code Here

Examples of org.eclipse.bpmn2.FlowElementsContainer

                break;
            }
        }
        assertNotNull(process);
       
        FlowElementsContainer container = null;
        for (FlowElement element : process.getFlowElements()) {
            if (element instanceof AdHocSubProcess) {
                container = (FlowElementsContainer) element;
                break;
            }
View Full Code Here

Examples of org.eclipse.bpmn2.FlowElementsContainer

                break;
            }
        }
        assertNotNull(process);
       
        FlowElementsContainer container = null;
        for (FlowElement element : process.getFlowElements()) {
            if (element instanceof SubProcess) {
                container = (FlowElementsContainer) element;
                break;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.