Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320596

Summary: XMLSerialization: IDs generated for elements without ID attribute
Product: [Modeling] MDT.BPMN2 Reporter: Henning Heitkoetter <hheitkoetter>
Component: CoreAssignee: Henning Heitkoetter <hheitkoetter>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Henning Heitkoetter CLA 2010-07-22 04:26:22 EDT
The Bpmn2Resource generates IDs for all elements (to ensure references by ID), even for those that do not have a corresponding structural feature (e.g. Import). Furthermore, an ID is generated even if the ID attribute has already been set, leading to a duplicate attribute.

The deserialization of resources with one of these errors fails with a FeatureNotFoundException; resp. SAXParseException.

Solution: Explicitly set IDs on save, where available, instead of useUUIDs=true.

Fix coming.
Comment 1 Henning Heitkoetter CLA 2010-07-22 04:33:24 EDT
Fixed in cb662cfb111947f6d26d642bc485528a46beb42b

Tests:
org.eclipse.bpmn2.tests.XMLSerializationTest.testIdSerialization()
org.eclipse.bpmn2.tests.XMLSerializationTest.testNoIDForImport()
org.eclipse.bpmn2.tests.XMLSerializationTest.testIDAlreadySet()