Examples of SubProcess


Examples of org.eclipse.bpmn2.SubProcess

        } else {
          boundaryEvent.setAttachedToRef(activity);
          activity.getBoundaryEventRefs().add(boundaryEvent);
        }
      } else if (flowElement instanceof SubProcess) {
        SubProcess subProcess = (SubProcess) flowElement;
        postProcessElements(process, subProcess.getFlowElements(), flowSourceMap, flowTargetMap);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

  private Activity retrieveAttachedRefObject(String attachedToRefId, Collection<FlowElement> flowElementList) {
    for (FlowElement flowElement : flowElementList) {
      if (attachedToRefId.equals(flowElement.getId())) {
        return (Activity) flowElement;
      } else if (flowElement instanceof SubProcess) {
        SubProcess subProcess = (SubProcess) flowElement;
        Activity activity = retrieveAttachedRefObject(attachedToRefId, subProcess.getFlowElements());
        if (activity != null) {
          return activity;
        }
      }
    }
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

  }

  private void loadEventObj(BaseElement baseElement) {
    BaseElementImpl baseElementImpl = (BaseElementImpl) baseElement;
    if (baseElement instanceof SubProcess) {
      SubProcess subProcess = (SubProcess) baseElement;
      List<FlowElement> flowElements = subProcess.getFlowElements();
      for (FlowElement flowElement : flowElements) {
        if (flowElement instanceof Activity) {
          loadEventObj(flowElement);
        }
      }
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

  protected String getStencilId(FlowElement flowElement) {
    return STENCIL_SUB_PROCESS;
  }

  protected void convertElementToJson(ObjectNode propertiesNode, FlowElement flowElement) {
    SubProcess subProcess = (SubProcess) flowElement;
    propertiesNode.put("activitytype", "Sub-Process");
    propertiesNode.put("subprocesstype", "Embedded");
    ArrayNode subProcessShapesArrayNode = objectMapper.createArrayNode();
  
    Bounds graphicInfo =  BpmnModelUtil.getBpmnShape(model, flowElement.getId()).getBounds();
    processor.processFlowElements(subProcess.getFlowElements(), model, subProcessShapesArrayNode,
        graphicInfo.getX(), graphicInfo.getY(),null);
    flowElementNode.put("childShapes", subProcessShapesArrayNode);
  }
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

        graphicInfo.getX(), graphicInfo.getY(),null);
    flowElementNode.put("childShapes", subProcessShapesArrayNode);
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    SubProcess subProcess = Bpmn2Factory.eINSTANCE.createSubProcess();// SubProcess();
    JsonNode childShapesArray = elementNode.get(EDITOR_CHILD_SHAPES);
    processor.processJsonElements(childShapesArray, modelNode, subProcess, shapeMap,sourceAndTargetMap,model);
    return subProcess;
  }
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

  protected String getStencilId(FlowElement flowElement) {
    return STENCIL_EVENT_SUB_PROCESS;
  }

  protected void convertElementToJson(ObjectNode propertiesNode, FlowElement flowElement) {
    SubProcess subProcess = (SubProcess) flowElement;
    propertiesNode.put("activitytype", "Event-Sub-Process");
    propertiesNode.put("subprocesstype", "Embedded");
    ArrayNode subProcessShapesArrayNode = objectMapper.createArrayNode();
    Bounds graphicInfo = BpmnModelUtil.getBpmnShape(model, flowElement.getId()).getBounds();
    processor.processFlowElements(subProcess.getFlowElements(), model, subProcessShapesArrayNode,
        graphicInfo.getX() + subProcessX, graphicInfo.getY() + subProcessY,null);
    flowElementNode.put("childShapes", subProcessShapesArrayNode);
  }
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

        graphicInfo.getX() + subProcessX, graphicInfo.getY() + subProcessY,null);
    flowElementNode.put("childShapes", subProcessShapesArrayNode);
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    SubProcess subProcess = Bpmn2Factory.eINSTANCE.createSubProcess();

    JsonNode childShapesArray = elementNode.get(EDITOR_CHILD_SHAPES);
    //processor.processJsonElements(childShapesArray, modelNode, subProcess, shapeMap);
    return subProcess;
  }
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

        if (element instanceof StartEvent) {

            outgoing = ((StartEvent) element).getOutgoing();
        } else if (element instanceof SubProcess) {
           
            SubProcess subProcess = ((SubProcess) element);
            outgoing = subProcess.getOutgoing();
        } else if (element instanceof Event) {
           
            outgoing = ((Event) element).getOutgoing();
        } else if (element instanceof Activity) {
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

          "Specialized type of sub-process that will have behavior controlled by transaction protocol");
    }

    @Override
    protected SubProcess createFlowElement(ICreateContext context) {
      SubProcess subProcess = ModelHandler.FACTORY.createTransaction();
      subProcess.setName("Transaction");
      return subProcess;
    }
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

  public IReason updateNeeded(IUpdateContext context) {
    Property triggerProperty = Graphiti.getPeService().getProperty(context.getPictogramElement(),
            TRIGGERED_BY_EVENT);
    if (triggerProperty == null)
      return Reason.createFalseReason();
    SubProcess process = (SubProcess) getBusinessObjectForPictogramElement(context.getPictogramElement());
    boolean changed = Boolean.parseBoolean(triggerProperty.getValue()) != process.isTriggeredByEvent();
    IReason reason = changed ? Reason.createTrueReason("Trigger property changed") : Reason.createFalseReason();
    return reason;
  }
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.