Examples of ThrowEvent


Examples of org.eclipse.bpmn2.ThrowEvent

    public void testIntermediateThrowEscalationEventUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("intermediateThrowEscalationEvent.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 2);
        Process process = getRootProcess(definitions);
        ThrowEvent g = (ThrowEvent) process.getFlowElements().get(0);
        assertEquals("throw escalation event", g.getName());
        assertTrue(g.getEventDefinitions().iterator().next() instanceof EscalationEventDefinition);
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.ThrowEvent

    public void testIntermediateThrowLinkEventUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("intermediateThrowLinkEvent.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        ThrowEvent g = (ThrowEvent) process.getFlowElements().get(0);
        assertEquals("throw link event", g.getName());
        assertTrue(g.getEventDefinitions().iterator().next() instanceof LinkEventDefinition);
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.ThrowEvent

    public void testIntermediateThrowCompensationUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("intermediateThrowCompensationEvent.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        ThrowEvent g = (ThrowEvent) process.getFlowElements().get(0);
        assertEquals("throw compensation event", g.getName());
        assertTrue(g.getEventDefinitions().iterator().next() instanceof CompensateEventDefinition);
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.ThrowEvent

    public void testIntermediateThrowSignalUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("intermediateThrowSignalEvent.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        ThrowEvent g = (ThrowEvent) process.getFlowElements().get(0);
        assertEquals("throw signal event", g.getName());
        assertTrue(g.getEventDefinitions().iterator().next() instanceof SignalEventDefinition);
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.ThrowEvent

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

Examples of org.eclipse.bpmn2.ThrowEvent

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.THROW_EVENT: {
            ThrowEvent throwEvent = (ThrowEvent) theEObject;
            T result = caseThrowEvent(throwEvent);
            if (result == null)
                result = caseEvent(throwEvent);
            if (result == null)
                result = caseFlowNode(throwEvent);
View Full Code Here

Examples of org.eclipse.bpmn2.ThrowEvent

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

Examples of org.eclipse.bpmn2.ThrowEvent

      return STENCIL_EVENT_THROW_NONE;
    }
  }

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

Examples of org.eclipse.bpmn2.ThrowEvent

    ThrowEvent throwEvent = (ThrowEvent) flowElement;
    addEventProperties(throwEvent, propertiesNode);
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    ThrowEvent throwEvent = Bpmn2Factory.eINSTANCE.createIntermediateThrowEvent();// ThrowEvent();
    String stencilId = BpmnJsonConverterUtil.getStencilId(elementNode);
    if (STENCIL_EVENT_THROW_SIGNAL.equals(stencilId)) {
      convertJsonToSignalDefinition(elementNode, throwEvent);
    }
    return throwEvent;
View Full Code Here

Examples of org.eclipse.bpmn2.ThrowEvent

    public void testIntermediateThrowEventUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = unmarshaller.unmarshall(getTestJsonFile("intermediateThrowEvent.json"));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = (Process) definitions.getRootElements().get(0);
        ThrowEvent g = (ThrowEvent) process.getFlowElements().get(0);
        assertEquals("throw event", g.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
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.