Package org.eclipse.bpmn2

Examples of org.eclipse.bpmn2.IntermediateCatchEvent


 
  private String intermediateTimerEventToSVG(BPMNShape bpmnShape) {
   
//SvgIntermediateTimerEventTo
    if (getBaseElement(bpmnShape.getBpmnElement()) instanceof IntermediateCatchEvent) {
      IntermediateCatchEvent intermediateCatchEvent=(IntermediateCatchEvent)getBaseElement(bpmnShape.getBpmnElement());
     
      for (EventDefinition eventDefinition : intermediateCatchEvent.getEventDefinitions()) {
        if(eventDefinition instanceof TimerEventDefinition){
          return CommonNodeToSVG(bpmnShape, new SvgIntermediateTimerEventTo());
        }
        if(eventDefinition instanceof ErrorEventDefinition){
          return CommonNodeToSVG(bpmnShape, new SvgIntermediateErrorEventTo());
View Full Code Here


  public static void fillBpmnTypes(Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap) {
    convertersToJsonMap.put(IntermediateCatchEvent.class, CatchEventJsonConverter.class);
  }
 
  protected String getStencilId(FlowElement flowElement) {
    IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
    List<EventDefinition> eventDefinitions = catchEvent.getEventDefinitions();
    if (eventDefinitions.size() != 1) {
      // return timer event as default;
      return STENCIL_EVENT_CATCH_TIMER;
    }
   
View Full Code Here

      return STENCIL_EVENT_CATCH_TIMER;
    }
  }

  protected void convertElementToJson(ObjectNode propertiesNode, FlowElement flowElement) {
    IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
    addEventProperties(catchEvent, propertiesNode);
  }
View Full Code Here

    IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
    addEventProperties(catchEvent, propertiesNode);
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    IntermediateCatchEvent catchEvent = Bpmn2Factory.eINSTANCE.createIntermediateCatchEvent();// IntermediateCatchEvent();
    String stencilId = BpmnJsonConverterUtil.getStencilId(elementNode);
    if (STENCIL_EVENT_CATCH_TIMER.equals(stencilId)) {
      convertJsonToTimerDefinition(elementNode, catchEvent);
    } else if (STENCIL_EVENT_CATCH_MESSAGE.equals(stencilId)) {
      convertJsonToMessageDefinition(elementNode, catchEvent);
View Full Code Here

                    eventDef = getEventDefinitionAsString(defs.get(0));
                }

                nodeProperties.put("node.type", "BoundaryEvent:"+eventDef);
            } else if (flowElement instanceof IntermediateCatchEvent) {
                IntermediateCatchEvent boundaryEvent = (IntermediateCatchEvent) flowElement;
                List<EventDefinition> defs = boundaryEvent.getEventDefinitions();
                String eventDef = "";

                if (defs != null && defs.size() > 0) {
                    eventDef = getEventDefinitionAsString(defs.get(0));
                }
                nodeProperties.put("node.type", "IntermediateCatchEvent:"+eventDef);
            } else if (flowElement instanceof IntermediateThrowEvent) {
                IntermediateThrowEvent boundaryEvent = (IntermediateThrowEvent) flowElement;
                List<EventDefinition> defs = boundaryEvent.getEventDefinitions();
                String eventDef = "";

                if (defs != null && defs.size() > 0) {
                    eventDef = getEventDefinitionAsString(defs.get(0));
                }
                nodeProperties.put("node.type", "IntermediateThrowEvent:"+eventDef);
            } else if (flowElement instanceof StartEvent) {
                StartEvent boundaryEvent = (StartEvent) flowElement;
                List<EventDefinition> defs = boundaryEvent.getEventDefinitions();
                String eventDef = "";

                if (defs != null && defs.size() > 0) {
                    eventDef = getEventDefinitionAsString(defs.get(0));
                }
                nodeProperties.put("node.type", "StartEvent:"+eventDef);
            } else if (flowElement instanceof EndEvent) {
                EndEvent boundaryEvent = (EndEvent) flowElement;
                List<EventDefinition> defs = boundaryEvent.getEventDefinitions();
                String eventDef = "";

                if (defs != null && defs.size() > 0) {
                    eventDef = getEventDefinitionAsString(defs.get(0));
                }
View Full Code Here

                    eventDef = getEventDefinitionAsString(defs.get(0));
                }

                nodeProperties.put("node.type", "BoundaryEvent:"+eventDef);
            } else if (flowElement instanceof IntermediateCatchEvent) {
                IntermediateCatchEvent boundaryEvent = (IntermediateCatchEvent) flowElement;
                List<EventDefinition> defs = boundaryEvent.getEventDefinitions();
                String eventDef = "";

                if (defs != null && defs.size() > 0) {
                    eventDef = getEventDefinitionAsString(defs.get(0));
                }
                nodeProperties.put("node.type", "IntermediateCatchEvent:"+eventDef);
            } else if (flowElement instanceof IntermediateThrowEvent) {
                IntermediateThrowEvent boundaryEvent = (IntermediateThrowEvent) flowElement;
                List<EventDefinition> defs = boundaryEvent.getEventDefinitions();
                String eventDef = "";

                if (defs != null && defs.size() > 0) {
                    eventDef = getEventDefinitionAsString(defs.get(0));
                }
                nodeProperties.put("node.type", "IntermediateThrowEvent:"+eventDef);
            } else if (flowElement instanceof StartEvent) {
                StartEvent boundaryEvent = (StartEvent) flowElement;
                List<EventDefinition> defs = boundaryEvent.getEventDefinitions();
                String eventDef = "";

                if (defs != null && defs.size() > 0) {
                    eventDef = getEventDefinitionAsString(defs.get(0));
                }
                nodeProperties.put("node.type", "StartEvent:"+eventDef);
            } else if (flowElement instanceof EndEvent) {
                EndEvent boundaryEvent = (EndEvent) flowElement;
                List<EventDefinition> defs = boundaryEvent.getEventDefinitions();
                String eventDef = "";

                if (defs != null && defs.size() > 0) {
                    eventDef = getEventDefinitionAsString(defs.get(0));
                }
View Full Code Here

      super(fp, "Catch Event", "Token remains at the event until event trigger will occur");
    }

    @Override
    protected IntermediateCatchEvent createFlowElement(ICreateContext context) {
      IntermediateCatchEvent event = ModelHandler.FACTORY.createIntermediateCatchEvent();
      event.setName("Catch");
      return event;
    }
View Full Code Here

        assertTrue(definitions.getRootElements().size() == 1);
        assertTrue(definitions.getRootElements().get(0) instanceof Process);
        Process process = getRootProcess(definitions);
        assertTrue(process.getLaneSets().size() == 1);
        assertTrue(process.getLaneSets().get(0).getLanes().size() == 1);
        Lane l = process.getLaneSets().get(0).getLanes().get(0);
        assertEquals("my first lane", l.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

    public void testMessageUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("message.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 2);
        assertTrue(definitions.getRootElements().iterator().next() instanceof Message);
        Message msg = (Message) definitions.getRootElements().iterator().next();
        assertEquals("message", msg.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

    public void testParallelGatewayUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("parallelGateway.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        ParallelGateway g = (ParallelGateway) process.getFlowElements().get(0);
        assertEquals("parallel gateway", g.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

TOP

Related Classes of org.eclipse.bpmn2.IntermediateCatchEvent

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.