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

Bug 326483

Summary: artifacts feature has been lost in ProcessEditProvider
Product: [Modeling] MDT.BPMN2 Reporter: Jin Liu <jin.liu>
Component: CoreAssignee: Project Inbox <mdt-bpmn2-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hheitkoetter, reiner.hille-doering
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jin Liu CLA 2010-09-29 01:50:10 EDT
I got some problems of adding/deleting some Artifacts(TextAnnotation, Group) from using "org.eclipse.bpmn2.edit", and I found that artifacts of Process is a containment feature, but this is not added to children feature of ProcessEditProvider. I think this is the problem, is it? 

and I get all sources from GIT: git://git.eclipse.org/gitroot/bpmn2
Comment 1 Henning Heitkoetter CLA 2010-09-29 05:14:20 EDT
Yes, you're right. Thanks for pointing this out.

In the genmodel, the Children, CreateChild and Notify properties of Process.artifacts were false. The same holds for the artifacts feature of SubChoreography and Subprocess, while the properties of Collaboration.artifacts were true.

This has been the case since the first commit. Reiner, do you have an idea why? Could there be other places with the same problem?
I've changed the properties in commit c368fdb39c3ee671666cc27289ce161f79b02daa and didn't see any negative consequences.
Comment 2 Henning Heitkoetter CLA 2010-09-29 07:44:13 EDT
(In reply to comment #1)
> Could there be other places with the same problem?

An OCL query on the Genmodel showed the following (containment references with children = false):

Evaluating:
self.genClasses.genFeatures->select(f:GenFeature|not f.children and f.ecoreFeature.oclIsKindOf(ecore::EReference) and f.ecoreFeature.oclAsType(ecore::EReference).containment)->collect(f:GenFeature|f.genClass.ecoreClass.name.concat('.').concat(f.ecoreFeature.name))
Results:
'DocumentRoot.xMLNSPrefixMap'
'DocumentRoot.xSISchemaLocation'
'Assignment.from'
'Assignment.to'
'CorrelationPropertyRetrievalExpression.messagePath'
'SubConversation.conversationNodes'

The first two occurrences seem to be legitimate, but the four others probably need to be addressed.
Comment 3 Reiner Hille CLA 2010-09-29 09:05:53 EDT
> Results:
> 'DocumentRoot.xMLNSPrefixMap'
> 'DocumentRoot.xSISchemaLocation'
> 'Assignment.from'
> 'Assignment.to'
> 'CorrelationPropertyRetrievalExpression.messagePath'
> 'SubConversation.conversationNodes'
> 
> The first two occurrences seem to be legitimate, but the four others probably
> need to be addressed.

Thanks Henning,
indeed this looks like a bug. I don't know how it happened. I tried to avoid manually touching the .genmodel during programmatic "merge" of the .ecore. I could immagine that it happened because I regenered the .ecore multiple times into the same directly. If for some reason one version of the metamodel did not contain such a reference, and the next contained it, the .genmodel has not been updated accordingly. I have seen similar problems with the "image" .genmodel attribute.
Please feel free to fix the issue :-)

Regards,
 Reiner.
Comment 4 Henning Heitkoetter CLA 2010-09-29 10:50:46 EDT
(In reply to comment #2)
> 'Assignment.from'
> 'Assignment.to'
> 'CorrelationPropertyRetrievalExpression.messagePath'
> 'SubConversation.conversationNodes'

Fixed in 618180b6f33147e2cf72b8cf9ce6d9d6023168c4