Author Topic: Odd create port/part behaviour  (Read 3281 times)

Jan van Mastbergen

  • EA User
  • **
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Odd create port/part behaviour
« on: July 25, 2005, 07:39:23 am »
In an activity diagram I define a port to a process. From the port an information flow runs into a data store. The port exists to allow me to specify details of the information flow as the flow connector itself does not provide that option.
The properties screen for the port does not allow me to specify a class to associate with the port, i.e there is no association.
If I drag a class onto the process EA prompts me to create a port. The new port is implicitly associated with the class as can be seen from the generated name for the port. Still I have no option in the properties window to modify this.
If I rename the port name in the project browser by hitting F2, I can modify the class name from f.i 'class1' to 'class2' there but it does not really change the class. Instead the process creates odd names f.i. 'Port1: class1' becomes 'Port1: class2: class1'.
Similar behavour can be observed when dragging a class onto a class and creating a part object.
Is this whole thing a bit buggy or am I missing something? I am running build 768.

Regards, Jan

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Odd create port/part behaviour
« Reply #1 on: July 25, 2005, 04:45:09 pm »
Jan,

"Ports" on processes in activity diagrams are not the same thing as ports on structural elements in structure diagrams.  I am not really sure what you are trying to achieve but I feel you may not have a full understanding of these behavioral "ports".  (Not that I'm suggesting that I have a good grasp of it either BTW!)

To me, at my current level of undertanding, these behavioral "ports" represent an attachment point to the behavioral element that lets us diagram entry and exit characteristics in more detail than we could in UML 1.  

Much has been written about UML 2 behavioral modelling - perhaps too much, because I for one still remain unclear on why we need all these new doohickeys that look exactly like other doohickeys from UML 1 and have created more confusion than they have solved.

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Jan van Mastbergen

  • EA User
  • **
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Odd create port/part behaviour
« Reply #2 on: July 26, 2005, 01:00:11 pm »
 :-/ Your remark about doohickeys prompted me to look again.  Apparently I did two things: drop a class on the process and it creates a port for me as I stated.
On the diagram, right-click the process and the 'Add embedded element' menu option lets you create an 'Object node'. Metadata-wise the two are almost the same (one has a 'role' and the other an 'alias').
What I want to do is pretty straightforward. Provide detail for the information that flows between processes and/or data stores. The flow object won't let me do that.
Anyhow, even if i have used the port or object node inappropriately, I hope you will agree with me that EA's behaviour as described is unsound.

Regards, Jan
« Last Edit: July 26, 2005, 01:01:17 pm by jvmastbe »

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Odd create port/part behaviour
« Reply #3 on: July 27, 2005, 05:20:47 pm »
OK, I've looked further.

1. Created new activity diagram
2. Added new process element "ProcessDoc"
3. Added an object node (which is not a port btw) using the context menu "Add Embedded Element|Object Node"
4. Edit the object node and gave it a name "Input Doc"
5. Selected the object node and used context menu "Advanced Settings|Set Instance Classifier" to associate node with a new class "document".

The document class is a normal classifer that  can be fully described as normal.

So it seems I was wrong and that you can classify an object node.

However, using the drop classifier as a port does not create an object node, and you can't set a classifier for it.
But.. a port is an attribute of a classifier,  IMO it remains a structural element and has no place being attached to a behavioural element.  So where EA is "wrong" is in allowing the port to be created on a behavioural element, or  dropping a classifier on a process (or other behavioral element) should have created an instance as an object node, expansion node or activity parameter and set the classifier of the instance to the originally selected classifier.

I'll leave it up to you to raise the relevant bug report.

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Jan van Mastbergen

  • EA User
  • **
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: Odd create port/part behaviour
« Reply #4 on: September 28, 2005, 03:36:25 pm »
Just submitted the thing as a bug to sparx sorry to have kept it lying around for so long  :-[