當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。