本文整理汇总了Java中org.eclipse.bpmn2.ConditionalEventDefinition类的典型用法代码示例。如果您正苦于以下问题:Java ConditionalEventDefinition类的具体用法?Java ConditionalEventDefinition怎么用?Java ConditionalEventDefinition使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ConditionalEventDefinition类属于org.eclipse.bpmn2包,在下文中一共展示了ConditionalEventDefinition类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: applyConditionalEventProperties
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
protected void applyConditionalEventProperties(ConditionalEventDefinition event,
Map<String, String> properties) {
FormalExpression conditionExpression = Bpmn2Factory.eINSTANCE.createFormalExpression();
ScriptTypeValue value = new ScriptTypeTypeSerializer().parse(properties.get("conditionexpression"));
if (value.getLanguage() != null && !value.getLanguage().isEmpty()) {
String languageFormat = Utils.getScriptLanguageFormat(value.getLanguage());
if (languageFormat == null) {
//default to drools
languageFormat = "http://www.jboss.org/drools/rule";
}
conditionExpression.setLanguage(languageFormat);
}
if (value.getScript() != null && !value.getScript().isEmpty()) {
String scriptStr = value.getScript().replaceAll("\\\\n",
"\n");
conditionExpression.setBody(wrapInCDATABlock(scriptStr));
}
event.setCondition(conditionExpression);
}
示例2: getText
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((ConditionalEventDefinition) object).getId();
return label == null || label.length() == 0 ? getString("_UI_ConditionalEventDefinition_type")
: getString("_UI_ConditionalEventDefinition_type") + " "
+ label;
}
示例3: notifyChanged
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(ConditionalEventDefinition.class)) {
case Bpmn2Package.CONDITIONAL_EVENT_DEFINITION__CONDITION:
fireNotifyChanged(new ViewerNotification(notification,
notification.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}
示例4: basicSetConditionalEventDefinition
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetConditionalEventDefinition(
ConditionalEventDefinition newConditionalEventDefinition,
NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed())
.basicAdd(
Bpmn2Package.Literals.DOCUMENT_ROOT__CONDITIONAL_EVENT_DEFINITION,
newConditionalEventDefinition, msgs);
}
示例5: setConditionalEventDefinition
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setConditionalEventDefinition(
ConditionalEventDefinition newConditionalEventDefinition) {
((FeatureMap.Internal) getMixed())
.set(Bpmn2Package.Literals.DOCUMENT_ROOT__CONDITIONAL_EVENT_DEFINITION,
newConditionalEventDefinition);
}
示例6: basicSetConditionalEventDefinition
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetConditionalEventDefinition(
ConditionalEventDefinition newConditionalEventDefinition, NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed()).basicAdd(
Bpmn2Package.Literals.DOCUMENT_ROOT__CONDITIONAL_EVENT_DEFINITION,
newConditionalEventDefinition, msgs);
}
示例7: setConditionalEventDefinition
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setConditionalEventDefinition(
ConditionalEventDefinition newConditionalEventDefinition) {
((FeatureMap.Internal) getMixed()).set(
Bpmn2Package.Literals.DOCUMENT_ROOT__CONDITIONAL_EVENT_DEFINITION,
newConditionalEventDefinition);
}
示例8: caseConditionalEventDefinition
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
@Override
public Adapter caseConditionalEventDefinition(
ConditionalEventDefinition object) {
return createConditionalEventDefinitionAdapter();
}
示例9: getConditionalEventDefinition
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ConditionalEventDefinition getConditionalEventDefinition() {
return (ConditionalEventDefinition) getMixed()
.get(Bpmn2Package.Literals.DOCUMENT_ROOT__CONDITIONAL_EVENT_DEFINITION,
true);
}
示例10: caseConditionalEventDefinition
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
@Override
public Adapter caseConditionalEventDefinition(ConditionalEventDefinition object) {
return createConditionalEventDefinitionAdapter();
}
示例11: marshallIntermediateCatchEvent
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的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.");
}
}
示例12: getConditionalEventDefinition
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ConditionalEventDefinition getConditionalEventDefinition() {
return (ConditionalEventDefinition) getMixed().get(
Bpmn2Package.Literals.DOCUMENT_ROOT__CONDITIONAL_EVENT_DEFINITION, true);
}
示例13: getFixture
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* Returns the fixture for this Conditional Event Definition test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected ConditionalEventDefinition getFixture() {
return (ConditionalEventDefinition) fixture;
}
示例14: caseConditionalEventDefinition
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* Returns the result of interpreting the object as an instance of '<em>Conditional Event Definition</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Conditional Event Definition</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseConditionalEventDefinition(ConditionalEventDefinition object) {
return null;
}
示例15: createConditionalEventDefinition
import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ConditionalEventDefinition createConditionalEventDefinition() {
ConditionalEventDefinitionImpl conditionalEventDefinition = new ConditionalEventDefinitionImpl();
return conditionalEventDefinition;
}