Problem with referencing resources when updating the referenced resource [message #647012] |
Tue, 04 January 2011 02:17 |
Abdel Messages: 10 Registered: July 2009 |
Junior Member |
|
|
Hi all,
I have created two instances of classes from an ecore model.
insctance one is: Functional.xmi
insctance two is: Organizational.xmi
Organizational.xmi has references to Functional.xmi. The reference is based in the following unidirectional EReference
<eStructuralFeatures xsi:type="ecore:EReference" name="activity" lowerBound="1" upperBound="-1" eType="#//Activity"/>
in Organizational.xmi we can find a reference to Functional.xmi like this:
<interactionPart xsi:type="bp:PerformerRole" name="Requester" isProcessorRole="true">
<activity xsi:type="bp:InstigationEvent" href="FunctionalView.xmi#//@activity.0"/>
<activity xsi:type="bp:REAAgentIdentification" href="FunctionalView.xmi#//@activity.3"/>
<activity xsi:type="bp:ContractEvent" href="FunctionalView.xmi#//@activity.4"/>
</interactionPart>
in the Functional.xmi we define objects of type Activity like this
<activity xsi:type="bp:InstigationEvent" name="Create Requisition" outResource="//@activity.0/@ownedResource.0">
<ownedResource xsi:type="bp:Requisition" name="Purchase requisition" resResource="//@activity.4/@ownedResource.0"/>
</activity>
<activity xsi:type="bp:REAAgentIdentification" name="Process RFQ" outResource="//@activity.1/@ownedResource.0">
<ownedResource xsi:type="bp:Artifact" name="Quotation"/>
</activity>
.......
The problem comes when I load my Functional.xmi and remove entries of type Activity (using EcoreUtil.delete). The Organizational.xmi does not follow.
In the Functional.xmi, every thing is ok. but removed references still in the Organizational.xmi even if I defines a bidirectional reference.
What can i do so the deleted object will be removed from the referencing resource and
the references will be valid (for example, if I delete //@activity.4 from Functional.xmi, than //@activity.5 becomes //@activity.4 in Organizational.xmi)
Thanks a lot
[Updated on: Tue, 04 January 2011 02:19] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02580 seconds