Package org.activiti.bpmn.model

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


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

   
    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

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

TOP

Related Classes of org.activiti.bpmn.model.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.