Author Topic: Copy Full Structure for duplication Issue  (Read 5436 times)

jack89

  • EA User
  • **
  • Posts: 49
  • Karma: +0/-1
    • View Profile
Copy Full Structure for duplication Issue
« on: October 05, 2020, 07:16:33 pm »
Hi all,

I experienced an issue in my model due to the function "copy full structure for duplication".

Imagine this scenario:

My model contains the following elements:
  • Package A with activity diagram A inside it
  • Package B with activity diagram B inside it
The activity diagram B contains an hyperlink to the activity diagram A.
 
Having said this, imagine that now I create a package C with an activity diagram C inside it. So my project tree looks like:

`-- Main Project
    |-- Package A
    |   `-- Activity Diagram A
    |-- Package B
    |   `-- Activity Diagram B (that contains an hyperlink to A)
    |-- Package C
    |   `-- Activity Diagram C
 
In the structure of the activity diagram C, it is required to have also a quite different version of activity diagram A. In order to avoid to re design a package quite similar to A, I chose to do a "Copy full structure for duplication" of package A and  paste it in the package C.

So my project tree looks like:

`-- Main Project
    |-- Package A
    |   `-- Activity Diagram A
    |-- Package B
    |   `-- Activity Diagram B (that contains an hyperlink to A)
    |-- Package C
    |   `-- Activity Diagram C
    |   `-- Duplication of Package A
    |         `-- Duplication of Activity Diagram A

Now I can proceed to modify the duplication of Activity diagram A inside the Package C and when I'm done, I can link the duplication of activity diagram A in my activity diagram C.
The fault is that the Activity diagram B that contains an hyperlink to A points now to his duplication (in package C)

In other words, it seems that the fully "copy for duplication" does not instantiate a fully new object, but it remains a link to the original package.

Have you ever experienced a similar fault?
Which is the correct way to work in order to avoid this issue?

Thank you in advance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy Full Structure for duplication Issue
« Reply #1 on: October 05, 2020, 07:29:21 pm »
That shouldn't happen.

The hyperlink in B, pointing to A should never change to the copy of A (in C)
Are you sure the hyperlink has changed?

Are you able to reproduce this?

Geert

jack89

  • EA User
  • **
  • Posts: 49
  • Karma: +0/-1
    • View Profile
Re: Copy Full Structure for duplication Issue
« Reply #2 on: October 05, 2020, 07:58:50 pm »
Unfortunally I'm not able to reproduce this issue. I made several trials related to copy and here the results:

  • If I do a "copy of structure for duplication" of a package A that contains a sequence diagram, the duplicated package contains the sequence diagram without messages (only lifelines are present)
  • If I try to do a copy selecting all the elements inside a sequence diagram A and I copying that elements in an empty sequence diagram B, I notice that every hyperlink in my project to the sequence diagram A stop to work (if you double click on it, nothing happens)

Which is the correct way to duplicate a diagram in order to avoid issues?

Thank you

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy Full Structure for duplication Issue
« Reply #3 on: October 05, 2020, 08:03:20 pm »
Sequence diagrams are a different story.
If you use links to classifiers instead of instances for your lifelines, you will lose the messages.

Geert

jack89

  • EA User
  • **
  • Posts: 49
  • Karma: +0/-1
    • View Profile
Re: Copy Full Structure for duplication Issue
« Reply #4 on: October 05, 2020, 08:22:30 pm »
Can you better clarify your concept with an example?
It would be very useful if you can illustrate me the proper way to duplicate a sequence diagram and an activity diagram.

Thank you

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy Full Structure for duplication Issue
« Reply #5 on: October 05, 2020, 09:59:26 pm »
Both should work with copy structure for duplication.

But you have to follow the UML rules.
For Sequence diagrams, don't use classes as link for your lifelines
For Activity Diagrams, don't re-use actions defined in another Activity.

Geert

jack89

  • EA User
  • **
  • Posts: 49
  • Karma: +0/-1
    • View Profile
Re: Copy Full Structure for duplication Issue
« Reply #6 on: October 06, 2020, 08:03:45 pm »
Hi Geert,

thanks for your support. I'm working with SysML language.

If I correctly understood your suggestion about sequence diagrams, I should create new lifelines (from toolbox section) instead of instantiating elements from block diagram. Is it correct?

If yes, why instantiating elements from block diagram may cause issues during duplication?

Thank you

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy Full Structure for duplication Issue
« Reply #7 on: October 06, 2020, 08:54:08 pm »
Instantiating elements is OK.
(you get a lifeline that has the element as classifier)

Adding elements as link is not (there is no lifeline object, just the linked element)

Geert

pmanzo

  • EA Novice
  • *
  • Posts: 9
  • Karma: +3/-0
    • View Profile
Re: Copy Full Structure for duplication Issue
« Reply #8 on: October 08, 2020, 01:26:24 am »
Instantiating elements is OK.
(you get a lifeline that has the element as classifier)

Adding elements as link is not (there is no lifeline object, just the linked element)

Geert

Hi Guys,

I`m following this discussion because I had the same issue on my project.

I tried to follow the indication from Geert:
Step 1. I draw a sequence diagram "S1" instantiating the elements (drag and drop the elements from block diagram to sequence diagram, selecting "drop as istance"). The sequence diagram "S1" is linked as hyperlink in the activity diagram "A".

Step 2. I "copy full structure for duplication" all the package that includes the sequence diagram "S1" and paste it in another package in the same project generating the Sequence diagram "S2" that is the "S1" duplication.

Step3. I modified only the sequence diagram "S2".

Step4. If I open the hyperlink to sequence diagram "S1" in the activity diagram "A", now it points to the "S2".

Can you please indicate me a procedure to maintain the original hyperlink to sequence diagram "S1" after copying it?
Have you noticed some wrong steps in my procedure?

Thank you in advance for your support.

Best Regards
 
 

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy Full Structure for duplication Issue
« Reply #9 on: October 08, 2020, 01:37:54 am »
Where's Activity diagram A?
Is there only one copy, or did you duplicate it as well (along with the sequence diagram)

I just tried it myself, but the hyperlink I created does not change when I duplicate the package with the sequence diagram.

Geert

pmanzo

  • EA Novice
  • *
  • Posts: 9
  • Karma: +3/-0
    • View Profile
Re: Copy Full Structure for duplication Issue
« Reply #10 on: October 08, 2020, 01:55:30 am »
Where's Activity diagram A?
Is there only one copy, or did you duplicate it as well (along with the sequence diagram)

I just tried it myself, but the hyperlink I created does not change when I duplicate the package with the sequence diagram.

Geert

The original scenario was the following:

`-- Main Project
    |-- Package P1
    |   `-- Activity Diagram A (that contains an hyperlink to S1)
    |   `-- Package P1.1
    |        `-- Sequence diagram S1
    |-- Package P2 (that is the copy of Package P1)
    |   `-- Activity Diagram B (that is the copy of Activity Diagram A)
    |   `-- Package P2.1 (that is the copy of Package P1.1)
    |        `-- Sequence diagram S2 (that is the copy of Sequence diagram S1)

I modified S2 and the structure is now the following:

`-- Main Project
    |-- Package P1
    |   `-- Activity Diagram A (now contains the wrong hyperlink to S2)
    |   `-- Package P1.1
    |        `-- Sequence diagram S1 (not modified)
    |-- Package P2 (that is the copy of Package P1)
    |   `-- Activity Diagram B (that is the copy of Activity Diagram A)
    |   `-- Package P2.1 (that is the copy of Package P1.1)
    |        `-- Sequence diagram S2 (modified by me)

In your trial, did you modify the sequence diagram after copying it?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy Full Structure for duplication Issue
« Reply #11 on: October 08, 2020, 02:09:09 am »
Ah, OK I see.

I do remember a similar issue in the past.

I tried the exact same scenario, but even then it contains only hyperlinks to S1 (even in the Activity Diagram in P2, which is another bug IMO)

I used version 15.2.1554

Geert

pmanzo

  • EA Novice
  • *
  • Posts: 9
  • Karma: +3/-0
    • View Profile
Re: Copy Full Structure for duplication Issue
« Reply #12 on: October 08, 2020, 02:18:51 am »
Sorry, but I'm not sure to have fully understood your previous post. Did you experienced the opposite issue, that is the hyperlink to S2 pointing to S1 after the modification?

Do you have a workaround solution to manage such issues?

P.S. the version I used is 15.0.1514.

Best Regards
« Last Edit: October 08, 2020, 03:29:11 am by pmanzo »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Copy Full Structure for duplication Issue
« Reply #13 on: October 08, 2020, 03:54:22 am »
Yes, both hyperlinks (the original, and the duplicate) point to a single diagram (the S1) in my test, although I would expect the duplicate to point to S2 (and the original to S1)

Geert