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;
}
Aggregations