Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.EventDefinition


      public void draw(DefaultProcessDiagramCanvas processDiagramCanvas, BpmnModel bpmnModel, FlowNode flowNode) {
        GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(flowNode.getId());
        StartEvent startEvent = (StartEvent) flowNode;
        if (startEvent.getEventDefinitions() != null && !startEvent.getEventDefinitions().isEmpty()) {
          EventDefinition eventDefinition = startEvent.getEventDefinitions().get(0);
          if (eventDefinition instanceof TimerEventDefinition) {
            processDiagramCanvas.drawTimerStartEvent(graphicInfo, scaleFactor);
          } else if (eventDefinition instanceof ErrorEventDefinition) {
            processDiagramCanvas.drawErrorStartEvent(graphicInfo, scaleFactor);
          } else if (eventDefinition instanceof SignalEventDefinition) {
View Full Code Here


   
    for (Process process : model.getProcesses()) {
      for (FlowElement flowElement : process.findFlowElementsOfType(Event.class)) {
        Event event = (Event) flowElement;
        if (!event.getEventDefinitions().isEmpty()) {
          EventDefinition eventDefinition = event.getEventDefinitions().get(0);
          if (eventDefinition instanceof SignalEventDefinition) {
            SignalEventDefinition signalEvent = (SignalEventDefinition) eventDefinition;
            if (model.containsSignalId(signalEvent.getSignalRef()) == false) {
              Signal signal = new Signal(signalEvent.getSignalRef(), signalEvent.getSignalRef());
              model.addSignal(signal);
View Full Code Here

    }

    // all start events share the same behavior:
    startEventActivity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createNoneStartEventActivityBehavior(startEvent));
    if (!startEvent.getEventDefinitions().isEmpty()) {
      EventDefinition eventDefinition = startEvent.getEventDefinitions().get(0);
      if (eventDefinition instanceof TimerEventDefinition
          || eventDefinition instanceof MessageEventDefinition
          || eventDefinition instanceof SignalEventDefinition) {
        bpmnParse.getBpmnParserHandlers().parseElement(bpmnParse, eventDefinition);
      } else {
View Full Code Here

      EventSubProcessStartEventActivityBehavior activityBehavior =
              bpmnParse.getActivityBehaviorFactory().createEventSubProcessStartEventActivityBehavior(startEvent, startEventActivity.getId());
      startEventActivity.setActivityBehavior(activityBehavior);
     
      if (!startEvent.getEventDefinitions().isEmpty()) {
        EventDefinition eventDefinition = startEvent.getEventDefinitions().get(0);
       
        if (eventDefinition instanceof org.activiti.bpmn.model.ErrorEventDefinition
                || eventDefinition instanceof MessageEventDefinition
                || eventDefinition instanceof SignalEventDefinition) {
          bpmnParse.getBpmnParserHandlers().parseElement(bpmnParse, eventDefinition);
View Full Code Here

  }
 
  protected void executeParse(BpmnParse bpmnParse, EndEvent endEvent) {
   
    ActivityImpl endEventActivity = createActivityOnCurrentScope(bpmnParse, endEvent, BpmnXMLConstants.ELEMENT_EVENT_END);
    EventDefinition eventDefinition = null;
    if (!endEvent.getEventDefinitions().isEmpty()) {
      eventDefinition = endEvent.getEventDefinitions().get(0);
    }
   
    // Error end event
View Full Code Here

 
  protected void executeParse(BpmnParse bpmnParse, ThrowEvent intermediateEvent) {

    ActivityImpl nestedActivityImpl = createActivityOnCurrentScope(bpmnParse, intermediateEvent, BpmnXMLConstants.ELEMENT_EVENT_THROW);
   
    EventDefinition eventDefinition = null;
    if (!intermediateEvent.getEventDefinitions().isEmpty()) {
      eventDefinition = intermediateEvent.getEventDefinitions().get(0);
    }
   
    if (eventDefinition instanceof SignalEventDefinition) {
View Full Code Here

 
  protected void executeParse(BpmnParse bpmnParse, IntermediateCatchEvent event) {
   
    BpmnModel bpmnModel = bpmnParse.getBpmnModel();
    ActivityImpl nestedActivity = null;
    EventDefinition eventDefinition = null;
    if (!event.getEventDefinitions().isEmpty()) {
      eventDefinition = event.getEventDefinitions().get(0);
    }
  
    if (eventDefinition == null) {
View Full Code Here

    }
  
    ActivityImpl nestedActivity = createActivityOnScope(bpmnParse, boundaryEvent, BpmnXMLConstants.ELEMENT_EVENT_BOUNDARY, parentActivity);
    bpmnParse.setCurrentActivity(nestedActivity);

    EventDefinition eventDefinition = null;
    if (!boundaryEvent.getEventDefinitions().isEmpty()) {
      eventDefinition = boundaryEvent.getEventDefinitions().get(0);
    }
   
    if (eventDefinition instanceof TimerEventDefinition
View Full Code Here

    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

  @Override
  protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) {
    List<IntermediateCatchEvent> intermediateCatchEvents = process.findFlowElementsOfType(IntermediateCatchEvent.class);
    for (IntermediateCatchEvent intermediateCatchEvent : intermediateCatchEvents) {
       EventDefinition eventDefinition = null;
        if (!intermediateCatchEvent.getEventDefinitions().isEmpty()) {
          eventDefinition = intermediateCatchEvent.getEventDefinitions().get(0);
        }
      
        if (eventDefinition == null) {
View Full Code Here

TOP

Related Classes of org.activiti.bpmn.model.EventDefinition

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.