Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MDT (Model Development Tools) » [BPMN2] own attributes removed on save
[BPMN2] own attributes removed on save [message #939165] Wed, 10 October 2012 13:38
Niko Dac is currently offline Niko DacFriend
Messages: 2
Registered: October 2012
Junior Member
Hi all,

I try to add specific attributes to my bpmn2 diagram. I followed examples to create my own property section and my own attributes.

Everything works fine when I modify the value of the attribute in my property section and I get immediately the following bpmn file and the diagram editor as dirty:

<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="" xmlns="" xmlns:bpmn2="" xmlns:bpmndi="" xmlns:dc="" xmlns:enrmodel2="" xmlns:xsd="" xsi:schemaLocation="" id="Definitions_1" expressionLanguage="" targetNamespace="" typeLanguage="">
<bpmn2:collaboration id="Collaboration_1" name="Default Collaboration">
<bpmn2:participant id="Participant_1" name="Initiating Pool" processRef="bpmn2:tProcess Process_1"/>
<bpmn2:participant id="Participant_2" name="Non-initiating Pool"/>
<bpmn2:process id="Process_1" processType="None">
<bpmn2:task id="Task_1" name="t1" completionQuantity="1" isForCompensation="false" startQuantity="1">
<enrmodel2:time-management enrmodel2:date="1"/>

<bpmndi:BPMNDiagram id="BPMNDiagram_1" name="Default Collaboration Diagram">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="bpmn2:tCollaboration Collaboration_1">
<bpmndi:BPMNShape id="BPMNShape_1" bpmnElement="bpmn2:tParticipant Participant_1">
<dc:Bounds height="1000.0" width="200.0" x="60.0" y="0.0"/>
<bpmndi:BPMNShape id="BPMNShape_2" bpmnElement="bpmn2:tParticipant Participant_2">
<dc:Bounds height="1000.0" width="200.0" x="480.0" y="50.0"/>
<bpmndi:BPMNShape id="BPMNShape_Task_1" bpmnElement="bpmn2:tTask Task_1">
<dc:Bounds height="50.0" width="110.0" x="75.0" y="105.0"/>

I use the following code to create my attribute:

documentRoot1 = Enrmodel2Factory.eINSTANCE.createDocumentRoot();
timeManagement = Enrmodel2Factory.eINSTANCE.createTimeManagement();
EStructuralFeature f2 = documentRoot1.eClass().getEStructuralFeature("timeManagement");
documentRoot1.eSet(f2, timeManagement);
EStructuralFeature f1 = timeManagement.eClass().getEStructuralFeature("date");
timeManagement.eSet(f1, attributeValue);
ModelUtil.addExtensionAttributeValue(task, f2, timeManagement);

However, when I save the diagram, my attribute is removed from the file and I don't find how to preserve this one. I have found document on recording command, resource saving... but everything I do does not work Sad .

What is wrong in my process or what I missed to do?

Thank you for any input Smile ,

Previous Topic:EMF based project to support Reusable Asset Specification (OMG Standard)
Next Topic:[MDT-OclInEcore] Code executed for dynamic instances but not for generated editor
Goto Forum:

Current Time: Sun Jun 04 07:38:17 GMT 2023

Powered by FUDForum. Page generated in 0.01656 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top