Author Topic: collaboration occurrence  (Read 4234 times)

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: collaboration occurrence
« Reply #15 on: October 25, 2007, 07:18:08 am »
This has nothing to do with multiplicity. It's about the kind of element.

thomaskilian

  • Guest
Re: collaboration occurrence
« Reply #16 on: October 25, 2007, 08:26:07 am »
I see. I'm riding the wrong horse. However, you should give a pointer to Superstructures so it is clear what you mean. I've seen something with Collaboration Occurence there and I never made use of that. Is it that thingy with the horizontal dash line inside the dashed ellipsis?

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: collaboration occurrence
« Reply #17 on: October 25, 2007, 09:24:36 am »
My apologies. I'm referring to the element that appears in fig. 9.12 in the Superstructure, described in 9.3.4 CollaborationUse.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: collaboration occurrence
« Reply #18 on: October 25, 2007, 10:05:35 am »
OK Frank,

Now we're making some progress. The EA documentation is somewhat inconsistent [yes Paolo, I hear you!] in the references it cites, and according to the reference you cite - or almost cite, please see the following note - there have been changes since UML 2.0.

Note: I am using the UML Superstructure specification with the OMG number 07-02-05 (without change bars) or 07-02-03 (with change bars). In these documents diagram 9.12 is found in section 9.3.3, just before the heading for section 9.3.4. I am assuming this is the correct reference.

Open the EA help file - use the file from build 817, which you can download from the Sparx site - and from the Contents look up The UML Dictionary | UML Elements | Basic Elements | Class. Immediately below this entry in the Contents tree you will find Collaboration and Collaboration Occurrence. Hopefully these describe the 'animal' you want to add to a diagram.

[The EA help file cites the older 2.0 UML specification, but hopefully you can work past that in your models.]

Unfortunately the EA help gives the impression that one can find the Collaboration element in the Class toolbar. Not so!

To get around this, what I did was hunt for this thing using the 'back door' method of shift-right-clicking on a diagram - I used a class diagram in my experiment, but you can do this from other diagrams as well.

So, here's how to get a Collaboration element:
  • Shift-right-click somewhere on the diagram surface.
  • Traverse the context menus starting with Other | UML.
  • Continue traversing to one of the following menus: Use Case, Object, or Composite.
  • Choose the Collaboration element from the final menu above.
This should provide you with the element you need to construct diagram 9.12 in the UML 2.1.1 Superstructure, or the Collaboration entry in EA Help.

Does this move you closer?

David
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: collaboration occurrence
« Reply #19 on: October 25, 2007, 10:58:10 am »
Nope, sorry, that's a Collaboration element, not a Collaboration Occurrence element.

It's clearly depicted and described in the EA Help. I just can't anywhere that says how to create it!

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: collaboration occurrence
« Reply #20 on: October 25, 2007, 11:14:06 am »
Frank,

Are you referring to the two 'inside' collaboration-type animals in diagram 9.14, UML 2.1.1, 07-02-05?

EDIT: Back from an experiment or two, and...

I can get these things by applying what's been said earlier by other posters here.

I defined a 'first' Collaboration as above. I then created a new 'second' collaboration in a new composite structure diagram - simply because I was following the example cited above - and tried adding instances (i.e. occurrences) of the earlier collaboration.

[I did this by first enlarging the second collaboration, so things would fit, then control-dragging the first collaboration from the Project Browser onto the first collaboration. I answered the dialog to confirm that I wanted an instance rather than a simple link.]

Each time I did so I got a collaboration with a name in the form of ":First" [note the colon]. If I now double-click the instance to open the properties dialog, I can enter a name for this instance of the collaboration. I now see something like "MyName :First" displayed in the instance. [Note the space before the colon. I don't know if this is per the UML definition, an acceptable convention used by EA, or an error. But I always seem to get it.]

In any case, this seems to cover what you want to do. How well it stacks up semantically, and how closely it parallels the intent of the UML 2.1.1 metamodel, I'll leave to the rest of you to debate.

Let the fireworks begin!

David
« Last Edit: October 25, 2007, 11:27:10 am by Midnight »
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: collaboration occurrence
« Reply #21 on: October 25, 2007, 11:25:47 am »
Yes ('retail' and 'wholesale')

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: collaboration occurrence
« Reply #22 on: October 25, 2007, 11:27:32 am »
See my edit above, Frank.
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: collaboration occurrence
« Reply #23 on: October 25, 2007, 11:46:32 am »
Thanks for investigating. However, I still can't get it to work.

When I click/drag a collaboration, I get a prompt for frame, instance or hyperlink, not instance or link.

I have no idea what I'm doing wrong.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: collaboration occurrence
« Reply #24 on: October 25, 2007, 11:52:01 am »
CONTROL-drag Frank.

Hold down the control key throughout. You should see a dialog named Paste Element.

You can change the setting for control-drag on this diagram. I would not advise doing so unless you are going to add a lot of instances at once.
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: collaboration occurrence
« Reply #25 on: October 25, 2007, 11:53:33 am »
Sorry, meant to type 'ctrl', not 'click'. It's not working for me.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: collaboration occurrence
« Reply #26 on: October 25, 2007, 11:55:26 am »
Are you dragging an already-created collaboration from the Project Browser? To be clear, I am not referring to the Collaboration icon in the toolbox.
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: collaboration occurrence
« Reply #27 on: October 25, 2007, 11:58:06 am »
Yes

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: collaboration occurrence
« Reply #28 on: October 25, 2007, 12:02:02 pm »
Then try just dragging the collaboration onto its 'parent.' Once you've done that, with the 'child' selected, right click the child and from the context menu choose Advanced | Convert to Instance.

Also, what kind of diagram are you working on? I don't know if this matters, but I am using a Composite Structure diagram.
No, you can't have it!

frankk

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
Re: collaboration occurrence
« Reply #29 on: October 25, 2007, 12:05:50 pm »
I get the same dialog whether I hold down Ctrl or not. Converting to instance just gives me a blank frame. (I'm dragging to a Composite, too.)