Examples of IntermediateCatchEvent


Examples of org.activiti.bpmn.model.IntermediateCatchEvent

   
    flowElement = model.getMainProcess().getFlowElement("catchEvent");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof IntermediateCatchEvent);
    assertEquals("catchEvent", flowElement.getId());
    IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
    assertTrue(catchEvent.getEventDefinitions().size() == 1);
    EventDefinition eventDefinition = catchEvent.getEventDefinitions().get(0);
    assertTrue(eventDefinition instanceof TimerEventDefinition);
    TimerEventDefinition timerDefinition = (TimerEventDefinition) eventDefinition;
    assertEquals("PT5M", timerDefinition.getTimeDuration());
   
    flowElement = model.getMainProcess().getFlowElement("flow1Condition");
View Full Code Here

Examples of org.activiti.bpmn.model.IntermediateCatchEvent

  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

Examples of org.activiti.bpmn.model.IntermediateCatchEvent

      return STENCIL_EVENT_CATCH_TIMER;
    }
  }

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

Examples of org.activiti.bpmn.model.IntermediateCatchEvent

    IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
    addEventProperties(catchEvent, propertiesNode);
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    IntermediateCatchEvent catchEvent = new 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

Examples of org.activiti.bpmn.model.IntermediateCatchEvent

   
    flowElement = model.getMainProcess().getFlowElement("catchsignal");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof IntermediateCatchEvent);
    assertEquals("catchsignal", flowElement.getId());
    IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) flowElement;
    assertEquals(1, catchEvent.getEventDefinitions().size());
    assertTrue(catchEvent.getEventDefinitions().get(0) instanceof SignalEventDefinition);
    SignalEventDefinition signalEvent = (SignalEventDefinition) catchEvent.getEventDefinitions().get(0);
    assertEquals("testSignal", signalEvent.getSignalRef());
   
    flowElement = model.getMainProcess().getFlowElement("subprocess");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof SubProcess);
View Full Code Here

Examples of org.activiti.bpmn.model.IntermediateCatchEvent

    // set name and description of the creation feature
    super(fp, "SignalCatchingEvent", "Add signal intermediate catching event");
  }

  public Object[] create(ICreateContext context) {
    IntermediateCatchEvent catchEvent = new IntermediateCatchEvent();
    SignalEventDefinition eventDef = new SignalEventDefinition();
    catchEvent.getEventDefinitions().add(eventDef);
    addObjectToContainer(context, catchEvent, "SignalCatchEvent");

    // return newly created business object(s)
    return new Object[] { catchEvent };
  }
View Full Code Here

Examples of org.eclipse.bpmn2.IntermediateCatchEvent

                    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

Examples of org.eclipse.bpmn2.IntermediateCatchEvent

                if(act.getIncoming() == null || act.getIncoming().size() == 0) {
                    triggerElements.add(0, fElement);
                }
            } else if (fElement instanceof IntermediateCatchEvent) {
               
                IntermediateCatchEvent act = (IntermediateCatchEvent) fElement;
                if(act.getIncoming() == null || act.getIncoming().size() == 0) {
                    triggerElements.add(0, fElement);
                }
               
                List<EventDefinition> eventDefinitions = ((IntermediateCatchEvent) fElement)
                        .getEventDefinitions();
View Full Code Here

Examples of org.eclipse.bpmn2.IntermediateCatchEvent

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.INTERMEDIATE_CATCH_EVENT: {
            IntermediateCatchEvent intermediateCatchEvent = (IntermediateCatchEvent) theEObject;
            T result = caseIntermediateCatchEvent(intermediateCatchEvent);
            if (result == null)
                result = caseCatchEvent(intermediateCatchEvent);
            if (result == null)
                result = caseEvent(intermediateCatchEvent);
View Full Code Here

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
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.