本文整理汇总了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());
}
示例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;
}
}
示例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();
}
}
}
}
示例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.");
}
}