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("userTask1");
View Full Code Here


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

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

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

        return;
      }
     
      String messageRef = null;
      if(bo instanceof IntermediateCatchEvent) {
        IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) bo;
        if(catchEvent.getEventDefinitions().get(0) != null) {
          MessageEventDefinition messageDefinition = (MessageEventDefinition) catchEvent.getEventDefinitions().get(0);
          if(StringUtils.isNotEmpty(messageDefinition.getMessageRef())) {
            messageRef = messageDefinition.getMessageRef();
          }
        }
      }
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

        return;
      }
     
      String signalRef = null;
      if(bo instanceof IntermediateCatchEvent) {
        IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) bo;
        if(catchEvent.getEventDefinitions().get(0) != null) {
          SignalEventDefinition signalDefinition = (SignalEventDefinition) catchEvent.getEventDefinitions().get(0);
          if(StringUtils.isNotEmpty(signalDefinition.getSignalRef())) {
            signalRef = signalDefinition.getSignalRef();
          }
        }
      }
View Full Code Here

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

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

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

      Object bo = getBusinessObject(pe);
      // the filter assured, that it is a EClass
      if (bo == null)
        return;
     
      IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) bo;
     
      if(catchEvent.getEventDefinitions().get(0) != null) {
        TimerEventDefinition timerDefinition = (TimerEventDefinition) catchEvent.getEventDefinitions().get(0);
        if (StringUtils.isNotEmpty(timerDefinition.getTimeDuration())) {
          String timeDuration = timerDefinition.getTimeDuration();
          timeDurationText.setText(timeDuration == null ? "" : timeDuration);
        } else {
          timeDurationText.setText("");
View Full Code Here

   
    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

    return ELEMENT_EVENT_CATCH;
  }
 
  @Override
  protected BaseElement convertXMLToElement(XMLStreamReader xtr) {
    IntermediateCatchEvent catchEvent = new IntermediateCatchEvent();
    parseChildElements(getXMLElementName(), catchEvent, xtr);
    return catchEvent;
  }
View Full Code Here

   
  }

  @Override
  protected void writeAdditionalChildElements(BaseElement element, XMLStreamWriter xtw) throws Exception {
    IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) element;
    writeEventDefinitions(catchEvent.getEventDefinitions(), xtw);
  }
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.