當前位置: 首頁>>代碼示例>>Java>>正文


Java IntermediateCatchEvent.getEventDefinitions方法代碼示例

本文整理匯總了Java中org.eclipse.bpmn2.IntermediateCatchEvent.getEventDefinitions方法的典型用法代碼示例。如果您正苦於以下問題:Java IntermediateCatchEvent.getEventDefinitions方法的具體用法?Java IntermediateCatchEvent.getEventDefinitions怎麽用?Java IntermediateCatchEvent.getEventDefinitions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.bpmn2.IntermediateCatchEvent的用法示例。


在下文中一共展示了IntermediateCatchEvent.getEventDefinitions方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: intermediateTimerEventToSVG

import org.eclipse.bpmn2.IntermediateCatchEvent; //導入方法依賴的package包/類
private String intermediateTimerEventToSVG(BPMNShape bpmnShape) {
		
//SvgIntermediateTimerEventTo
		if (getBaseElement(bpmnShape.getBpmnElement()) instanceof IntermediateCatchEvent) {
			IntermediateCatchEvent intermediateCatchEvent=(IntermediateCatchEvent)getBaseElement(bpmnShape.getBpmnElement());
			
			for (EventDefinition eventDefinition : intermediateCatchEvent.getEventDefinitions()) {
				if(eventDefinition instanceof TimerEventDefinition){
					return CommonNodeToSVG(bpmnShape, new SvgIntermediateTimerEventTo());
				}
				if(eventDefinition instanceof ErrorEventDefinition){
					return CommonNodeToSVG(bpmnShape, new SvgIntermediateErrorEventTo());
				}
			}
			
			return CommonNodeToSVG(bpmnShape, new SvgIntermediateEventTo());
			
		}
		
		return CommonNodeToSVG(bpmnShape, new SvgIntermediateEventTo());
	}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:22,代碼來源:GetFlowGraphicsSvgCmd.java

示例2: getStencilId

import org.eclipse.bpmn2.IntermediateCatchEvent; //導入方法依賴的package包/類
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;
  }
  
  EventDefinition eventDefinition = eventDefinitions.get(0);
  if (eventDefinition instanceof MessageEventDefinition) {
    return STENCIL_EVENT_CATCH_MESSAGE;
  } else if (eventDefinition instanceof SignalEventDefinition) {
    return STENCIL_EVENT_CATCH_SIGNAL;
  } else {
    return STENCIL_EVENT_CATCH_TIMER;
  }
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:18,代碼來源:CatchEventJsonConverter.java

示例3: createIntermediateEvent

import org.eclipse.bpmn2.IntermediateCatchEvent; //導入方法依賴的package包/類
public static void createIntermediateEvent(EObject object, XMLStreamWriter xtw) throws Exception {
	IntermediateCatchEvent catchEvent = (IntermediateCatchEvent) object;
  List<EventDefinition> eventDefinitionList = catchEvent.getEventDefinitions();
  if(eventDefinitionList.size() == 1) {
    if(eventDefinitionList.get(0) instanceof TimerEventDefinition) {
      TimerEventDefinition timerDef = (TimerEventDefinition) eventDefinitionList.get(0);
      if(timerDef.getTimeDuration() != null && 
              ((((FormalExpression) timerDef.getTimeDuration()).getBody() != null && 
                      ((FormalExpression) timerDef.getTimeDuration()).getBody().length() > 0) ||
                      
                      (((FormalExpression) timerDef.getTimeDate()).getBody() != null && 
                              ((FormalExpression) timerDef.getTimeDate()).getBody().length() > 0) ||
                              
                              (((FormalExpression) timerDef.getTimeCycle()).getBody() != null && 
                                      ((FormalExpression) timerDef.getTimeCycle()).getBody().length() > 0))) {
        
        // start TimerBoundaryEvent element
        xtw.writeStartElement("intermediateCatchEvent");
        xtw.writeAttribute("id", catchEvent.getId());
        if (catchEvent.getName() != null) {
          xtw.writeAttribute("name", catchEvent.getName());
        }
        
        xtw.writeStartElement("timerEventDefinition");
        
        if(((FormalExpression) timerDef.getTimeDuration()).getBody() != null && 
                      ((FormalExpression) timerDef.getTimeDuration()).getBody().length() > 0) {
          
          xtw.writeStartElement("timeDuration");
          xtw.writeCharacters(((FormalExpression) timerDef.getTimeDuration()).getBody());
          xtw.writeEndElement();
        
        } else if(((FormalExpression) timerDef.getTimeDate()).getBody() != null && 
                      ((FormalExpression) timerDef.getTimeDate()).getBody().length() > 0) {
          
          xtw.writeStartElement("timeDate");
          xtw.writeCharacters(((FormalExpression) timerDef.getTimeDate()).getBody());
          xtw.writeEndElement();
        
        } else {
          
          xtw.writeStartElement("timeCycle");
          xtw.writeCharacters(((FormalExpression) timerDef.getTimeCycle()).getBody());
          xtw.writeEndElement();
        }
        
        xtw.writeEndElement();

        // end TimerIntermediateCatchEvent element
        xtw.writeEndElement();
      }
    }
  }
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:55,代碼來源:IntermediateCatchEventExport.java

示例4: marshallIntermediateCatchEvent

import org.eclipse.bpmn2.IntermediateCatchEvent; //導入方法依賴的package包/類
protected void marshallIntermediateCatchEvent(IntermediateCatchEvent catchEvent,
                                              BPMNPlane plane,
                                              JsonGenerator generator,
                                              float xOffset,
                                              float yOffset,
                                              Map<String, Object> properties) throws JsonGenerationException, IOException {
    List<EventDefinition> eventDefinitions = catchEvent.getEventDefinitions();
    // simulation properties
    setSimulationProperties(catchEvent.getId(),
                            properties);
    if (eventDefinitions.size() == 1) {
        EventDefinition eventDefinition = eventDefinitions.get(0);
        if (eventDefinition instanceof SignalEventDefinition) {
            marshallNode(catchEvent,
                         properties,
                         "IntermediateSignalEventCatching",
                         plane,
                         generator,
                         xOffset,
                         yOffset);
        } else if (eventDefinition instanceof MessageEventDefinition) {
            marshallNode(catchEvent,
                         properties,
                         "IntermediateMessageEventCatching",
                         plane,
                         generator,
                         xOffset,
                         yOffset);
        } else if (eventDefinition instanceof TimerEventDefinition) {
            marshallNode(catchEvent,
                         properties,
                         "IntermediateTimerEvent",
                         plane,
                         generator,
                         xOffset,
                         yOffset);
        } else if (eventDefinition instanceof ConditionalEventDefinition) {
            marshallNode(catchEvent,
                         properties,
                         "IntermediateConditionalEvent",
                         plane,
                         generator,
                         xOffset,
                         yOffset);
        } else if (eventDefinition instanceof ErrorEventDefinition) {
            marshallNode(catchEvent,
                         properties,
                         "IntermediateErrorEvent",
                         plane,
                         generator,
                         xOffset,
                         yOffset);
        } else if (eventDefinition instanceof EscalationEventDefinition) {
            marshallNode(catchEvent,
                         properties,
                         "IntermediateEscalationEvent",
                         plane,
                         generator,
                         xOffset,
                         yOffset);
        } else if (eventDefinition instanceof CompensateEventDefinition) {
            marshallNode(catchEvent,
                         properties,
                         "IntermediateCompensationEventCatching",
                         plane,
                         generator,
                         xOffset,
                         yOffset);
        } else {
            throw new UnsupportedOperationException("Event definition not supported: " + eventDefinition);
        }
    } else {
        throw new UnsupportedOperationException("Intermediate catch event does not have event definition.");
    }
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:76,代碼來源:Bpmn2JsonMarshaller.java


注:本文中的org.eclipse.bpmn2.IntermediateCatchEvent.getEventDefinitions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。