Search in sources :

Example 6 with Relationship

use of org.eclipse.bpmn2.Relationship in project kie-wb-common by kiegroup.

the class ProcessPropertyWriter method getRelationship.

public Relationship getRelationship() {
    Relationship relationship = bpmn2.createRelationship();
    relationship.setType(defaultRelationshipType);
    BPSimDataType simDataType = bpsim.createBPSimDataType();
    // currently support single scenario
    Scenario defaultScenario = bpsim.createScenario();
    ScenarioParameters scenarioParameters = bpsim.createScenarioParameters();
    // single scenario suppoert
    defaultScenario.setId("default");
    // single scenario support
    defaultScenario.setName("Simulationscenario");
    defaultScenario.setScenarioParameters(scenarioParameters);
    simDataType.getScenario().add(defaultScenario);
    ExtensionAttributeValue extensionElement = bpmn2.createExtensionAttributeValue();
    relationship.getExtensionValues().add(extensionElement);
    FeatureMap.Entry extensionElementEntry = new EStructuralFeatureImpl.SimpleFeatureMapEntry((EStructuralFeature.Internal) BpsimPackage.Literals.DOCUMENT_ROOT__BP_SIM_DATA, simDataType);
    relationship.getExtensionValues().get(0).getValue().add(extensionElementEntry);
    defaultScenario.getElementParameters().addAll(simulationParameters);
    return relationship;
}
Also used : FeatureMap(org.eclipse.emf.ecore.util.FeatureMap) Relationship(org.eclipse.bpmn2.Relationship) EStructuralFeature(org.eclipse.emf.ecore.EStructuralFeature) ScenarioParameters(bpsim.ScenarioParameters) ExtensionAttributeValue(org.eclipse.bpmn2.ExtensionAttributeValue) BPSimDataType(bpsim.BPSimDataType) Scenario(bpsim.Scenario)

Aggregations

BPSimDataType (bpsim.BPSimDataType)4 Relationship (org.eclipse.bpmn2.Relationship)4 FeatureMap (org.eclipse.emf.ecore.util.FeatureMap)4 Scenario (bpsim.Scenario)3 ExtensionAttributeValue (org.eclipse.bpmn2.ExtensionAttributeValue)3 ElementParameters (bpsim.ElementParameters)2 List (java.util.List)2 QName (javax.xml.namespace.QName)2 Relationship (org.apache.cxf.ws.addressing.v200408.Relationship)2 ControlParameters (bpsim.ControlParameters)1 CostParameters (bpsim.CostParameters)1 PriorityParameters (bpsim.PriorityParameters)1 ResourceParameters (bpsim.ResourceParameters)1 ScenarioParameters (bpsim.ScenarioParameters)1 TimeParameters (bpsim.TimeParameters)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 RelatesToType (org.apache.cxf.ws.addressing.RelatesToType)1 AttributedQName (org.apache.cxf.ws.addressing.v200408.AttributedQName)1 EList (org.eclipse.emf.common.util.EList)1