当前位置: 首页>>代码示例>>Java>>正文


Java ConditionalEventDefinition类代码示例

本文整理汇总了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);
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:21,代码来源:Bpmn2JsonUnmarshaller.java

示例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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:14,代码来源:ConditionalEventDefinitionItemProvider.java

示例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);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:20,代码来源:ConditionalEventDefinitionItemProvider.java

示例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);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:14,代码来源:DocumentRootImpl.java

示例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);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:12,代码来源:DocumentRootImpl.java

示例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);
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:12,代码来源:DocumentRootImpl.java

示例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);
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:12,代码来源:DocumentRootImpl.java

示例8: caseConditionalEventDefinition

import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
@Override
public Adapter caseConditionalEventDefinition(
		ConditionalEventDefinition object) {
	return createConditionalEventDefinitionAdapter();
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:6,代码来源:Bpmn2AdapterFactory.java

示例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);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:11,代码来源:DocumentRootImpl.java

示例10: caseConditionalEventDefinition

import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
@Override
public Adapter caseConditionalEventDefinition(ConditionalEventDefinition object) {
    return createConditionalEventDefinitionAdapter();
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:5,代码来源:Bpmn2AdapterFactory.java

示例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.");
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:76,代码来源:Bpmn2JsonMarshaller.java

示例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);
}
 
开发者ID:fixteam,项目名称:fixflow,代码行数:10,代码来源:DocumentRootImpl.java

示例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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:11,代码来源:ConditionalEventDefinitionTest.java

示例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;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:15,代码来源:Bpmn2Switch.java

示例15: createConditionalEventDefinition

import org.eclipse.bpmn2.ConditionalEventDefinition; //导入依赖的package包/类
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public ConditionalEventDefinition createConditionalEventDefinition() {
	ConditionalEventDefinitionImpl conditionalEventDefinition = new ConditionalEventDefinitionImpl();
	return conditionalEventDefinition;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:10,代码来源:Bpmn2FactoryImpl.java


注:本文中的org.eclipse.bpmn2.ConditionalEventDefinition类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。