Examples of BoundaryEvent


Examples of org.activiti.bpmn.model.BoundaryEvent

    }
  }
 
  @Override
  protected void writeAdditionalChildElements(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception {
    BoundaryEvent boundaryEvent = (BoundaryEvent) element;
    writeEventDefinitions(boundaryEvent, boundaryEvent.getEventDefinitions(), model, xtw);
  }
View Full Code Here

Examples of org.activiti.bpmn.model.BoundaryEvent

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

Examples of org.activiti.bpmn.model.BoundaryEvent

      return STENCIL_EVENT_BOUNDARY_TIMER;
    }
  }

  protected void convertElementToJson(ObjectNode propertiesNode, FlowElement flowElement) {
    BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement;
    ArrayNode dockersArrayNode = objectMapper.createArrayNode();
    ObjectNode dockNode = objectMapper.createObjectNode();
    GraphicInfo graphicInfo = model.getGraphicInfo(boundaryEvent.getId());
    GraphicInfo parentGraphicInfo = model.getGraphicInfo(boundaryEvent.getAttachedToRef().getId());
    dockNode.put(EDITOR_BOUNDS_X, graphicInfo.getX() + graphicInfo.getWidth() - parentGraphicInfo.getX());
    dockNode.put(EDITOR_BOUNDS_Y, graphicInfo.getY() - parentGraphicInfo.getY());
    dockersArrayNode.add(dockNode);
    flowElementNode.put("dockers", dockersArrayNode);
   
    propertiesNode.put(PROPERTY_CANCEL_ACTIVITY, boundaryEvent.isCancelActivity() ? PROPERTY_VALUE_YES : PROPERTY_VALUE_NO);
   
    addEventProperties(boundaryEvent, propertiesNode);
  }
View Full Code Here

Examples of org.activiti.bpmn.model.BoundaryEvent

   
    addEventProperties(boundaryEvent, propertiesNode);
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    BoundaryEvent boundaryEvent = new BoundaryEvent();
    boundaryEvent.setAttachedToRefId(lookForAttachedRef(elementNode.get(EDITOR_SHAPE_ID).asText(), modelNode.get(EDITOR_CHILD_SHAPES)));
    boundaryEvent.setCancelActivity(getPropertyValueAsBoolean(PROPERTY_CANCEL_ACTIVITY, elementNode, true));
   
    String stencilId = BpmnJsonConverterUtil.getStencilId(elementNode);
    if (STENCIL_EVENT_BOUNDARY_TIMER.equals(stencilId)) {
      convertJsonToTimerDefinition(elementNode, boundaryEvent);
    } else if (STENCIL_EVENT_BOUNDARY_ERROR.equals(stencilId)) {
      boundaryEvent.setCancelActivity(true); //always true
      convertJsonToErrorDefinition(elementNode, boundaryEvent);
    } else if (STENCIL_EVENT_BOUNDARY_SIGNAL.equals(stencilId)) {
      convertJsonToSignalDefinition(elementNode, boundaryEvent);
    } else if (STENCIL_EVENT_BOUNDARY_MESSAGE.equals(stencilId)) {
      convertJsonToMessageDefinition(elementNode, boundaryEvent);
View Full Code Here

Examples of org.activiti.bpmn.model.BoundaryEvent

   
    extensionElementMap = serviceTask.getExtensionElements();
    validateExtensionElements(extensionElementMap);
   
    assertEquals(1, serviceTask.getBoundaryEvents().size());
    BoundaryEvent boundaryEvent = serviceTask.getBoundaryEvents().get(0);
    assertEquals("timerEvent", boundaryEvent.getId());
    assertEquals(1, boundaryEvent.getEventDefinitions().size());
    assertTrue(boundaryEvent.getEventDefinitions().get(0) instanceof TimerEventDefinition);
    extensionElementMap = boundaryEvent.getEventDefinitions().get(0).getExtensionElements();
    validateExtensionElements(extensionElementMap);
  }
View Full Code Here

Examples of org.activiti.bpmn.model.BoundaryEvent

  private void postProcessElements(FlowElementsContainer process, Collection<FlowElement> flowElementList) {
   
    for (FlowElement flowElement : flowElementList) {
     
      if (flowElement instanceof BoundaryEvent) {
        BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement;
        Activity activity = retrieveAttachedRefObject(boundaryEvent.getAttachedToRefId(), process.getFlowElements());
       
        if (activity == null) {
          LOGGER.warn("Boundary event " + boundaryEvent.getId() + " is not attached to any activity");
        } else {
          boundaryEvent.setAttachedToRef(activity);
          activity.getBoundaryEvents().add(boundaryEvent);
        }
      } else if (flowElement instanceof SubProcess) {
        SubProcess subProcess = (SubProcess) flowElement;
        postProcessElements(subProcess, subProcess.getFlowElements());
View Full Code Here

Examples of org.activiti.bpmn.model.BoundaryEvent

    // Boundary timer
    activityDrawInstructions.put(BoundaryEvent.class, new ActivityDrawInstruction() {

      public void draw(DefaultProcessDiagramCanvas processDiagramCanvas, BpmnModel bpmnModel, FlowNode flowNode) {
        GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(flowNode.getId());
        BoundaryEvent boundaryEvent = (BoundaryEvent) flowNode;
        if (boundaryEvent.getEventDefinitions() != null && !boundaryEvent.getEventDefinitions().isEmpty()) {
          if (boundaryEvent.getEventDefinitions().get(0) instanceof TimerEventDefinition) {
           
            processDiagramCanvas.drawCatchingTimerEvent(flowNode.getName(), graphicInfo, boundaryEvent.isCancelActivity(), scaleFactor);
           
          } else if (boundaryEvent.getEventDefinitions().get(0) instanceof ErrorEventDefinition) {
           
            processDiagramCanvas.drawCatchingErrorEvent(graphicInfo, boundaryEvent.isCancelActivity(), scaleFactor);
           
          } else if (boundaryEvent.getEventDefinitions().get(0) instanceof SignalEventDefinition) {
            processDiagramCanvas.drawCatchingSignalEvent(flowNode.getName(), graphicInfo, boundaryEvent.isCancelActivity(), scaleFactor);
          }
        }
       
      }
    });
View Full Code Here

Examples of org.activiti.bpmn.model.BoundaryEvent

        FlowNode targetNode = getFlowNodeFromScope(sequenceFlow.getTargetRef(), parentScope);
        if (targetNode != null) {
          targetNode.getIncomingFlows().add(sequenceFlow);
        }
      } else if (flowElement instanceof BoundaryEvent) {
        BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement;
        FlowElement attachedToElement = getFlowNodeFromScope(boundaryEvent.getAttachedToRefId(), parentScope);
        if(attachedToElement != null) {
          boundaryEvent.setAttachedToRef((Activity) attachedToElement);
          ((Activity) attachedToElement).getBoundaryEvents().add(boundaryEvent);
        }
      } else if(flowElement instanceof SubProcess) {
        SubProcess subProcess = (SubProcess) flowElement;
        processFlowElements(subProcess.getFlowElements(), subProcess);
View Full Code Here

Examples of org.activiti.bpmn.model.BoundaryEvent

        addEventSubscriptionDeclaration(bpmnParse, eventSubscription, messageDefinition, activity);  
      }
     
    } else if (bpmnParse.getCurrentFlowElement() instanceof BoundaryEvent) {
     
      BoundaryEvent boundaryEvent = (BoundaryEvent) bpmnParse.getCurrentFlowElement();
      boolean interrupting = boundaryEvent.isCancelActivity();
      activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createBoundaryEventActivityBehavior(boundaryEvent, interrupting, activity));
     
      activity.setProperty("type", "boundaryMessage");
     
      EventSubscriptionDeclaration eventSubscriptionDeclaration = new EventSubscriptionDeclaration(messageDefinition.getMessageRef(), "message");
View Full Code Here

Examples of org.activiti.bpmn.model.BoundaryEvent

     
      timerActivity.setProperty("type", "boundaryTimer");
      TimerDeclarationImpl timerDeclaration = createTimer(bpmnParse, timerEventDefinition, timerActivity, TimerExecuteNestedActivityJobHandler.TYPE);
     
      // ACT-1427
      BoundaryEvent boundaryEvent = (BoundaryEvent) bpmnParse.getCurrentFlowElement();
      boolean interrupting = boundaryEvent.isCancelActivity();
      if (interrupting) {
        timerDeclaration.setInterruptingTimer(true);
      }
     
      addTimerDeclaration(timerActivity.getParent(), timerDeclaration);
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.