Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.Lane


    Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
    if (parentObject instanceof SubProcess) {
      ((SubProcess) parentObject).addFlowElement(newMailTask);
     
    } else if (parentObject instanceof Lane) {
      final Lane lane = (Lane) parentObject;
      lane.getFlowReferences().add(newMailTask.getId());
      lane.getParentProcess().addFlowElement(newMailTask);
     
    } else {
      Bpmn2MemoryModel model = ModelHandler.getModel(EcoreUtil.getURI(getDiagram()));
      if (model.getBpmnModel().getMainProcess() == null) {
        model.addMainProcess();
View Full Code Here


    Object parentObject = getBusinessObjectForPictogramElement(context.getTargetContainer());
    if (parentObject instanceof SubProcess) {
      ((SubProcess) parentObject).addFlowElement(newScriptTask);
     
    } else if (parentObject instanceof Lane) {
      final Lane lane = (Lane) parentObject;
      lane.getFlowReferences().add(newScriptTask.getId());
      lane.getParentProcess().addFlowElement(newScriptTask);
     
    } else {
      Bpmn2MemoryModel model = ModelHandler.getModel(EcoreUtil.getURI(getDiagram()));
      if (model.getBpmnModel().getMainProcess() == null) {
        model.addMainProcess();
View Full Code Here

    if(bo instanceof Lane || bo instanceof Pool) {
      centerText((ContainerShape) shape);
    }
   
    if (bo instanceof Lane) {
      Lane lane = (Lane) bo;
      ContainerShape poolShape = shape.getContainer();
      setSize(poolShape, poolShape.getGraphicsAlgorithm().getWidth() + deltaWidth,
              poolShape.getGraphicsAlgorithm().getHeight() + deltaHeight);
      centerText(poolShape);
     
      int laneY = shape.getGraphicsAlgorithm().getY();
     
      for (Lane otherLane : lane.getParentProcess().getLanes()) {
       
        if(lane.equals(otherLane)) continue;
       
        ContainerShape otherLaneShape = (ContainerShape) getFeatureProvider().getPictogramElementForBusinessObject(otherLane);
        setSize(otherLaneShape, otherLaneShape.getGraphicsAlgorithm().getWidth() + deltaWidth,
                otherLaneShape.getGraphicsAlgorithm().getHeight());
       
View Full Code Here

    List<Lane> sortedLanes = new ArrayList<Lane>();
    for (Lane lane : lanes) {
      int index = -1;
      ContainerShape laneShape = (ContainerShape) getFeatureProvider().getPictogramElementForBusinessObject(lane);
      for (int i = 0; i < sortedLanes.size(); i++) {
        Lane sortedLane = sortedLanes.get(i);
        ContainerShape sortedLaneShape = (ContainerShape) getFeatureProvider().getPictogramElementForBusinessObject(sortedLane);
        if(sortedLaneShape.getGraphicsAlgorithm().getY() > laneShape.getGraphicsAlgorithm().getY()) {
          index = i;
          break;
        }
View Full Code Here

          }
          for (BoundaryEvent event : activity.getBoundaryEvents()) {
            subProcess.removeFlowElement(event.getId());
          }
        } else if (containerBo instanceof Lane) {
          Lane lane = (Lane) containerBo;
          lane.getFlowReferences().remove(activity.getId());
          lane.getParentProcess().removeFlowElement(activity.getId());
          for (SequenceFlow flow : activity.getOutgoingFlows()) {
            lane.getParentProcess().removeFlowElement(flow.getId());
          }
          for (BoundaryEvent event : activity.getBoundaryEvents()) {
            lane.getParentProcess().removeFlowElement(event.getId());
          }
        }
      } else {
        if (model.getBpmnModel().getMainProcess() != null) {
          model.getBpmnModel().getMainProcess().removeFlowElement(activity.getId());
          for (SequenceFlow flow : activity.getOutgoingFlows()) {
            model.getBpmnModel().getMainProcess().removeFlowElement(flow.getId());
          }
          for (BoundaryEvent event : activity.getBoundaryEvents()) {
            model.getBpmnModel().getMainProcess().removeFlowElement(event.getId());
          }
        }
      }
     
      if (context.getTargetContainer() instanceof Diagram == false) {
        Object containerBo = getFeatureProvider().getBusinessObjectForPictogramElement(context.getTargetContainer());
        if (containerBo instanceof SubProcess) {
          SubProcess subProcess = (SubProcess) containerBo;
          subProcess.addFlowElement(activity);
          for (SequenceFlow flow : activity.getOutgoingFlows()) {
            subProcess.addFlowElement(flow);
          }
          for (BoundaryEvent event : activity.getBoundaryEvents()) {
            subProcess.addFlowElement(event);
          }
        } else if (containerBo instanceof Lane) {
          Lane lane = (Lane) containerBo;
          lane.getFlowReferences().add(activity.getId());
          lane.getParentProcess().addFlowElement(activity);
          for (SequenceFlow flow : activity.getOutgoingFlows()) {
            lane.getParentProcess().addFlowElement(flow);
          }
          for (BoundaryEvent event : activity.getBoundaryEvents()) {
            lane.getParentProcess().addFlowElement(event);
          }
        }
      } else {
        if (model.getBpmnModel().getMainProcess() == null) {
          model.addMainProcess();
View Full Code Here

TOP

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

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.