Package org.eclipse.bpmn2

Examples of org.eclipse.bpmn2.FlowElement


                } else if (def instanceof ErrorEventDefinition) {
                    key = ((ErrorEventDefinition) def)
                            .getErrorRef().getId();
                }

                FlowElement catchEvent = manager.getCatchingEvents().get(key);
                if (catchEvent != null) {
                    super.handle(catchEvent, manager);
                } else {
                    // not supported event definition
                    manager.finalizePath();
View Full Code Here


            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.FLOW_ELEMENT: {
            FlowElement flowElement = (FlowElement) theEObject;
            T result = caseFlowElement(flowElement);
            if (result == null)
                result = caseBaseElement(flowElement);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here

    for(FlowElement flowElement:flowElements){
        if(flowElement instanceof SequenceFlowBehavior){
          List<JsonNode> sourceAndTarget = sourceAndTargetMap.get(BpmnJsonConverterUtil.getFormatEdgeId(flowElement.getId()));
          String sourceRef = BpmnJsonConverterUtil.getElementId(sourceAndTarget.get(0));
          String target = BpmnJsonConverterUtil.getElementId(sourceAndTarget.get(1));
          FlowElement sourceRefNode = BpmnModelUtil.getElement(model, sourceRef, FlowNode.class);
          FlowElement targetNode = BpmnModelUtil.getElement(model, target, FlowNode.class);
          ((SequenceFlowBehavior)flowElement).setSourceRef((FlowNode)sourceRefNode);
          ((SequenceFlowBehavior)flowElement).setTargetRef((FlowNode)targetNode);
        }
        if(flowElement instanceof SubProcessBehavior){
          SubProcessBehavior subProcessBehavior = (SubProcessBehavior)flowElement;
View Full Code Here

    processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否查询到
    assertNotNull(processDefinitionBehavior);
   
    //查询新的流程定义中有没有ScriptTask_1
    FlowElement flowElement = processDefinitionBehavior.getFlowElement("ScriptTask_1");
    //验证是否查询到此节点
    assertNotNull(flowElement);
   
  }
View Full Code Here

    processDefinitionBehavior=processDefinitionQuery.singleResult();
    //验证是否查询到
    assertNotNull(processDefinitionBehavior);
   
    //查询新的流程定义中有没有ScriptTask_1
    FlowElement flowElement = processDefinitionBehavior.getFlowElement("ScriptTask_1");
    //验证是否查询到此节点
    assertNotNull(flowElement);
   
  }
View Full Code Here

      ActivityProcessor processor, BaseElement parentElement, Map<String, JsonNode> shapeMap, Map<String, List<JsonNode>> sourceAndTargetMap, Definitions model2) {
    //subProcess使用
    this.processor = processor;
    this.model = model2;
    this.sourceAndTargetMap = sourceAndTargetMap;
    FlowElement flowElement = convertJsonToElement(elementNode, modelNode, shapeMap);
    flowElement.setId(BpmnJsonConverterUtil.getElementId(elementNode));
    flowElement.setName(getPropertyValueAsString(PROPERTY_NAME, elementNode));
    String documentation = getPropertyValueAsString(PROPERTY_DOCUMENTATION, elementNode);
    if(StringUtil.isNotEmpty(documentation)){
      BpmnModelUtil.setDocumentation(flowElement, documentation);
    }
    // 这里注释掉内容以后需要恢复过来
View Full Code Here

                } else if (def instanceof ErrorEventDefinition) {
                    key = ((ErrorEventDefinition) def)
                            .getErrorRef().getId();
                }

                FlowElement catchEvent = manager.getCatchingEvents().get(key);
                if (catchEvent != null) {
                    PathContext context = manager.getContextFromStack();
                    boolean canBeFinished = context.isCanBeFinished();
                    context.setCanBeFinished(false);
                    super.handle(catchEvent, manager);
View Full Code Here

          if(scenario.getElementParameters() != null) {
            for(ElementParameters eleType : scenario.getElementParameters()) {
              if(eleType.getElementRef().equals(nodeId)) {
                if(eleType.getControlParameters() != null && eleType.getControlParameters().getProbability() != null) {

                            FlowElement element = null;
                            for (RootElement root : def.getRootElements()) {
                                if (root instanceof Process) {
                                    element = findElementInContainer((FlowElementsContainer) root, nodeId);
                                    if (element != null && element instanceof SequenceFlow) {
                                        element = ((SequenceFlow)element).getSourceRef();
View Full Code Here

       
        for (FlowElement fElement : currentContainerElems) {
            if (fElement.getId().equals(id) ) {
                return fElement;
            } else if (fElement instanceof FlowElementsContainer) {
                FlowElement fe = findElementInContainer((FlowElementsContainer) fElement, id);
                if (fe != null) {
                    return fe;
                }
            }
        }
View Full Code Here

    }

    public Map<String, Object> getProcessDataForNode(Node node) {

        Map<String, Object> nodeProperties = new HashMap<String, Object>();
        FlowElement flowElement = null;
                List<RootElement> rootElements = def.getRootElements();
        for (RootElement root : rootElements) {
            if (root instanceof Process) {
                flowElement = findElementInContainer((FlowElementsContainer) root, (String) node.getMetaData().get("UniqueId"));
                break;
View Full Code Here

TOP

Related Classes of org.eclipse.bpmn2.FlowElement

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.