Possible Bug adding sub diagram

I have an element in a number of my Activity Diagrams called “FAIL WITH KLAXONS” which I link to a a place holder activity diagram which explains “this is where the SERIOUS error handling will be dealt with”

Stupidly, I did NOT create a single FAIL with the appropriate link and colour (which would have saved me some time running about when I later decided to change the colour and add the link)

In one particular diagram I’ve had to use the FAIL element twice because drawing connectors to just one would have looked ugly.

And I’m getting the following bizarre behaviour when I try to add the relevant link to either of the FAILs.

I can successfully link one.

If I now add it to the other one, it disappears from the first! If I then add it back to the first, it disappears from the Second - and so on.

I speculated that this may be due to the elements having identical names (though, if that were an issue, I’d expect the two identical elements to acquire the same link, rather than insist on exclusivity)

So I changed the name of the first and tried again. The behaviour didn’t change.

Then I tried linking each to diffent sub-diagrams and that worked. So the message is that two elements in a drawing cannot link to the same sub-diagram. Surely that can’t be right!?

I’m obviously still a VP novice, but I’m also an experienced coder and that looks very bug-like to me.

Suggestions?

We went over this in another thread already, this is by design.

The moment you create a sub diagram (or assign an already existing diagram) then that diagram will be placed “below” the linked element within the repository hierarchy. I guess this is the proof you had been looking for over there.

My recommendation is therefor to also utilize references.

I didn’t make the connection. I obviously haven’t internalised the VP model behaviour.

Are you saying that whenever I choose “Existing Diagram”, I am moving that existing diagram to a new position in the hierarchy, and thus breaking any links from other elements which may have been linked to that existing diagram?

If so, I’m going to have to restart from scratch.

And, if I switch to using References instead, could I, for example, have a “library” of activity diagrams (or whatever) which would not need to be in any hierarchy but could just be called upon as needed and would remain exactly where I leave them?

If so, how would I go about creating a repository “outside” the model hierarchy?
and, can we still link directly to those referenced diagrams, like we can with the sub-diagrams?

Ayups.

That wouldn’t be a problem at all.

Maybe a rule of thumb: a reference merely references (marks the existence of something) whereas a sub diagram will become part of the new hierarchy.

As to looking for ‘repositories’… Depends on your license I guess. The Standard edition and up allows you to reference projects. So in other words you could have a diagram from project A directly reference a diagram in project B, it could even re-use model elements if needed.

That could be an alternative I guess. Though I can’t help wonder if you’re not over-complicating some things this way.

Though I can’t help wonder if you’re not over-complicating some things this way.

You may be right but I’m used to the object oriented paradigm and class reuse is pretty efficient.
If we use this tool for one project, we’ll use it for many and a Library of useful components will be essential.

Thanks for clarifying the behaviour

// hope that I didn’t get wrong
You defined a diagram (for handling failure) and want other diagrams’ elements can reference to that handling failure diagram.

I have 2 suggestions:
A. use Diagram Overview shape(s)

B. use References

– about colors of your element(s) –
I think you can specify your ‘style’ of those elements.

Thanks Peter

I’ve finally wrapped my head around using references rather than sub-diagrams but I don’t understand your “Diagram Overview” advice. How/where would I use that?

On a wider question (for anyone)
I’m now beginning to rebuild the project to fix all the novice errors I’ve made so far - the biggest of which has been to use Sub diagrams instead of references, which has left half my links broken.

What I would like to do but cannot see how, is to move all my activity diagrams to a holding location (call it “Library, Repository”, whatever) and call them by reference only in the main drawings.

Because I couldn’t figure out how to do that, I have, instead, fired up a new project, while opening up the original in a different workspace. I was hoping to be able to set up a “Library” in the new, then copy the diagrams from the original to the new. Can’t seem to do that either.

Can someone advise me on how to achieve what I’m trying to do?

The immediate object is to be able to structure the new version in such a way that when I publish it to html (using the Project Publisher) the structure will flow as it should.