Package org.apache.cocoon.transformation.helpers

Examples of org.apache.cocoon.transformation.helpers.MirrorRecorder$EndEvent


    public void testEndMultipleEventUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("endMultipleEvent.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        EndEvent g = (EndEvent) process.getFlowElements().get(0);
        assertEquals("end multiple event", g.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here


    public void testEndCompensationEventUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("endCompensationEvent.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        EndEvent g = (EndEvent) process.getFlowElements().get(0);
        assertEquals("end compensation event", g.getName());
        assertTrue(g.getEventDefinitions().iterator().next() instanceof CompensateEventDefinition);
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

                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

        if (startAt instanceof IntermediateThrowEvent) {
            throwDefinitions = ((IntermediateThrowEvent) startAt)
                    .getEventDefinitions();

        } else if (startAt instanceof EndEvent) {
            EndEvent end = (EndEvent) startAt;

            throwDefinitions = end.getEventDefinitions();
        }

        return throwDefinitions;
    }
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.END_EVENT: {
            EndEvent endEvent = (EndEvent) theEObject;
            T result = caseEndEvent(endEvent);
            if (result == null)
                result = caseThrowEvent(endEvent);
            if (result == null)
                result = caseEvent(endEvent);
View Full Code Here

   */
  public static void processHasEndEvent(List<FlowElement> flowElements,StringBuffer sb) {
    List<EndEvent> endEvents = new ArrayList<EndEvent>();
    for (FlowElement flowElement : flowElements) {
      if (flowElement instanceof EndEvent) {
        EndEvent endEvent = (EndEvent) flowElement;
        endEvents.add(endEvent);
      }
    }
    if (endEvents.size() > 0) {

View Full Code Here

   * @param flowElements
   */
  public static void endEventHasIncoming(List<FlowElement> flowElements,StringBuffer sb) {
    for (FlowElement flowElement : flowElements) {
      if (flowElement instanceof EndEvent) {
        EndEvent endEvent = (EndEvent) flowElement;
        if (endEvent.getIncoming().size() < 1) {
          sb.append("没有连接线指向结束节点;");
        }
      }
    }
  }
View Full Code Here

  private String endEventToSVG(BPMNShape bpmnShape) {
   

    if (getBaseElement(bpmnShape.getBpmnElement()) instanceof EndEvent) {
      EndEvent endEvent=(EndEvent)getBaseElement(bpmnShape.getBpmnElement());
     
      for (EventDefinition eventDefinition : endEvent.getEventDefinitions()) {
        if(eventDefinition instanceof TerminateEventDefinition){
          return CommonNodeToSVG(bpmnShape, new SvgTerminateEndEventTo());
        }
        if(eventDefinition instanceof ErrorEventDefinition){
          return CommonNodeToSVG(bpmnShape, new SvgEndErrorEventTo());
View Full Code Here

  public static void fillBpmnTypes(Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap) {
    convertersToJsonMap.put(EndEventBehavior.class, EndEventJsonConverter.class);
  }
 
  protected String getStencilId(FlowElement flowElement) {
    EndEvent endEvent = (EndEvent) flowElement;
    List<EventDefinition> eventDefinitions = endEvent.getEventDefinitions();
    if (eventDefinitions.size() != 1) {
      return STENCIL_EVENT_END_NONE;
    }
   
    EventDefinition eventDefinition = eventDefinitions.get(0);
View Full Code Here

      return STENCIL_EVENT_END_NONE;
    }
  }
 
  protected void convertElementToJson(ObjectNode propertiesNode, FlowElement flowElement) {
    EndEvent endEvent = (EndEvent) flowElement;
    addEventProperties(endEvent, propertiesNode);
  }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.transformation.helpers.MirrorRecorder$EndEvent

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.