Bug 481384 - [SequenceDiagram] Can't do an InteractionUse across models
Summary: [SequenceDiagram] Can't do an InteractionUse across models
Status: ASSIGNED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Celine Janssens CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-04 03:44 EST by Ulf Olsson CLA
Modified: 2017-08-02 13:36 EDT (History)
3 users (show)

See Also:


Attachments
Project containng the two models (5.37 KB, application/x-zip-compressed)
2015-11-04 03:44 EST, Ulf Olsson CLA
no flags Details
New project (two models) (6.81 KB, application/x-zip-compressed)
2017-01-26 11:04 EST, Ulf Olsson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulf Olsson CLA 2015-11-04 03:44:16 EST
Created attachment 257719 [details]
Project containng the two models

Context:
The enclosed archive shows a project containing two models (Main and Sub).
Main contains a sequence diagram with two subsequences (i.e., instances of InteractionUse): one referring to the sequence in Sub (Sub_seq), the other one to a sequence in Main (InternalSub). with one sequence diagram each. 

Problem: 
When I double click on Sub_seq, I get "Cannot find diagram..."

Analysis:
Strange, as Main.uml contains what seems to be a correct reference to the diagram in Sub:
    <fragment xmi:type="uml:InteractionUse" xmi:id="_vUbaEILKEeWsbKC1wwHlRA" name="Subsequence" covered="_k-GfcILKEeWsbKC1wwHlRA _oIILcILKEeWsbKC1wwHlRA">
      <refersTo xmi:type="uml:Interaction" href="Sub.uml#_fTFdYILKEeWsbKC1wwHlRA"/>
    </fragment>

And the diagram exists in Sub.uml:
 <packagedElement xmi:type="uml:Interaction" xmi:id="_fTFdYILKEeWsbKC1wwHlRA" name="Sub_seq">

However, double clicking on InternalSub works fine; the fragment looks the same except that it has no external reference (of course):
    <fragment xmi:type="uml:InteractionUse" xmi:id="_2iW5AILNEeWJaoIIqnn2gw" name="Internal subsequence" covered="_oIILcILKEeWsbKC1wwHlRA _k-GfcILKEeWsbKC1wwHlRA" refersTo="_mh338ILNEeWJaoIIqnn2gw"/>

I.e., it seems like the code for resolving the reference is missing.
Note: doing the import selecting Load (and not just Import) doesn't help.
Comment 1 Ulf Olsson CLA 2016-03-02 07:58:33 EST
Note that the phenomenon still exists in Neon M5. It is causing us problems, as we depend on modeling subsequences in one project and then reusing them as ready-made building blocks in other projects.
Comment 2 Celine Janssens CLA 2017-01-26 10:09:27 EST
Hello Ulf, 

Could you give me the step-by-step path in order to reproduce your issue from scratch from an empty sequence diagram ? 

Thank a lot
Céline
Comment 3 Ulf Olsson CLA 2017-01-26 11:03:01 EST
Hi!
Recreated the issue from scratch on Neon (new project enclosed).
- Create a project
- Create a model (MainModel)
- Create a component
- Create an interaction (MainInteraction) with a Composite (MainStructure) and a Sequence diagram (MainSequence) with two instances of the component, add a couple of messages
- Create another interaction (IntSub) with a sequence diagram (IntSubSequence) with a couple of messages.
- Create an InteractionUse, set the reference to IntSub
- Create another model (ExtModel)
- Add an interaction (ExtSub) with a sequence diagram (SubSequence)
- Import MainModel and use the same instances
- Open MainModel
- Import ExtModel
- Create an InteractionUse, set the reference to ExtSub

Now, double clicking on IntSub opens the sequence diagram as expected; double clicking on ExtSub gives "Cannot find diagram of the referenced interaction!"
However, an improvement vs Mars is that a hyperlink to the desired sequence diagram can be set up and followed using the Alt-click method.
Comment 4 Ulf Olsson CLA 2017-01-26 11:04:15 EST
Created attachment 266471 [details]
New project (two models)
Comment 5 Eclipse Genie CLA 2017-02-02 04:02:33 EST
New Gerrit change created: https://git.eclipse.org/r/90155
Comment 6 Peter Cigehn CLA 2017-02-08 04:54:47 EST
How can the bug be put into resolved fixed if the related Gerrit change https://git.eclipse.org/r/#/c/90155/ is not yet merged? I would expect that any pending Gerrit changes to be merged before actually putting the related bug in resolved fixed, otherwise the stakeholder, e.g. the one that wrote the bug, cannot test it yet since it is not included in any nightly build or similar.
Comment 7 Celine Janssens CLA 2017-02-08 05:14:06 EST
Ok Peter, the gerrit has been provided. I'm waiting Patrick to merge it. 
So i'll let it into Assigned ?!
Comment 8 Peter Cigehn CLA 2017-02-08 05:20:06 EST
(In reply to Celine Janssens from comment #7)
> Ok Peter, the gerrit has been provided. I'm waiting Patrick to merge it. 
> So i'll let it into Assigned ?!

Yes, that is more reasonable. The person who reviews and approves, and finally submits/merges the Gerrit change is probably the one that shall ensure that the corresponding bug is then put into resolved fixed, to indicate to any stakeholder that the fix actually are in place in a build. As long as the change is "stuck" in Gerrit (which it unfortunately can be for years), the bug cannot be considered resolved fixed.

Just check the list of pending Gerrit changes for Papyrus and you will see that there a quite a few very old ones still there:

https://git.eclipse.org/r/#/q/status:open+project:papyrus/org.eclipse.papyrus

That person can also review and provide feedback that additional Gerrit changes should be submitted, e.g. if there are unit tests that needs to be provided (in case they were not included in the initial Gerrit change), and wait with putting the bug into resolved fixed until all Gerrit changes have been merged.