Book a Demo

Author Topic: UML Structural: behavioral/behavior port  (Read 5627 times)

Arun Gupta

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-1
    • View Profile
UML Structural: behavioral/behavior port
« on: October 07, 2015, 08:54:19 am »
Greetings!
As search in all the places suggested by the etiquette guide yield nothing - the general question is - How is a behavioral port represented in Sparx EA? In particular, Figure 4-6 of UML 2.0 in a Nutshell? (scroll down here: https://www.safaribooksonline.com/library/view/uml-20-in/0596007957/ch04.html )

In words, the diagram has a classifier with a port on its boundary, and a state inside the classifier.  The state and the port are connected. I presume by a connector, but Sparx EA tells me that is invalid UML.

Text accompanying Figure 111, page 170 of the UML 2 SuperStructure document (on the Sparx website at http://www.sparxsystems.com/bin/UML2SuperStructure.pdf  (PDF) ) says: "A behavior port is indicated by a port connected through a line to a small state symbol inside the symbol representing the containing classifier".   My question can be rephrased - per Sparx, what is the correct type of line - I thought it had to be "connector", but EA says it is bad UML.

Thanks in advance!
-Arun Gupta

PS: this page
http://www.uml-diagrams.org/component-diagrams.html
says that " a connector with one or more ends connected to a port that is not on a part and that is not a behavior port is a delegation; otherwise it is an assembly".   I'm unable to make delegation or assembly work, it is denied as invalid UML.
« Last Edit: October 07, 2015, 09:41:07 am by macgupta »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: UML Structural: behavioral/behavior port
« Reply #1 on: October 07, 2015, 09:48:58 am »
What is a behavioral port? Never heard that. A port is a means of grouping interfaces belonging to an element. It has no behavior.

q.

Arun Gupta

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-1
    • View Profile
Re: UML Structural: behavioral/behavior port
« Reply #2 on: October 08, 2015, 12:42:09 am »
http://www.sparxsystems.com/bin/UML2SuperStructure.pdf (PDF)
The above-linked PDF describes ports and behavior ports (in the UML 2 in a Nutshell book, they're called behavioral ports.)

To quote from there:

A port has the ability to specify that any requests arriving at this port are handled by the behavior of the instance of the owning  classifier, rather than being forwarded to any contained instances, if any.

Attributes:

isBehavior: Boolean

Specifies whether requests arriving at this port are sent to the classifier behavior of this  classifier (see “BehavioredClassifier (from BasicBehaviors)” on page 383). Such ports are  referred to as  behavior port Any invocation of a behavioral feature targeted at a behavior  port will be handled by the instance of the owning classifier itself, rather than by any  instances that this classifier may contain. The default value is false.

Page 170 of the same document has this:


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: UML Structural: behavioral/behavior port
« Reply #3 on: October 08, 2015, 01:06:30 am »
In the (UML 2.5 specs) it says:

Quote
A Port has the ability, by setting the property isBehavior to true, to specify that any requests arriving at this Port are handled by the Behavior of the instance of the owning EncapsulatedClassifier, rather than being forwarded to any contained instances, if any. Such a Port is called a behavior Port. If there is no Behavior defined for this EncapsulatedClassifier, any communication arriving at a behavior Port is lost.

So that would mean that you have to define a behavior for the owner of the port, and set the property isBehavior to true.

I found the isBehavior property, but how do I specify the "Behavior of the instance of the owning EncapsulatedClassifier"?

Anyway, I'm guessing EA doesn't support that specific notation (which has a far smaller state icon in the official specs)

Geert