Does UML allow a connection (delegation) between ports and activity parameters? - uml

I found an example UML diagram which puzzles me:
I am not sure if this corresponds to UML 2.4.1 as no modeling tool I tried lets me create the connection. I looked up the specification and I think that the connection is not valid UML 2.4.1 because an activity parameter node is not a ConnectableElement, but I am not sure. However, the example is taken from the specification of the UML MARTE 1.1 profile by the OMG, which says
Note that this usage of connectors is
compatible with the abstract syntax of UML, as both Property and Parameter are ConnectableElements
In the above figure, input is of type Activity Parameter Node which is special type of ObjectNode, similar but different to Pin. It is associate with parameters owned by the activity:
The connection in the figure is a delegation connector. As can be seen in the above hierarchy, ActivityParameterNode is not a ConnectableElement, so I think the statement in the UML MARTE specification is wrong.
Is this connection is valid UML 2.4.1 and should be supported by UML modelling tools?

This is no valid UML (neither 2.4.1 nor 2.5 or any prior one). It mixes behavior with static design. A port on a class is a static construct which allows to attach interfaces. An ActivityParameterNode in contrast is used to model "data flow" (it can send or receive objects via an ObjectFlow to/from Pins of Actions inside).
This is (probably; my knowledge is not sufficient here) valid in MARTE. You can make it valid in your domain by introducing a profile which defines this language construct. Most likely you could use a MARTE profile for UML or an extension of it or (as said) you make your own.
P.S.: I tried that in Enterprise Architect and it lets create me a Dependency or an InformationFlow between both.

Related

What is the difference between a UML node and a UML component?

I am designing an UML diagram for an Apple Watch Extension. How should I represent host app using UML ? UML Node or UML component ? Please note that there can be inter app communication between the extension app and the iPhone app (host app).
UML nodes are apparently used to depict physical resources, so your watch would be a node, whereas a component is usually understood as a software component. Since you want to model software, go with components (which will also nicely visualise the plugging between extension and host).
uml-diagrams.org explains the basic difference as "node is a deployment target" while "component is a structured class representing a modular part of a system"
They're typically used in different kinds of diagrams with different purposes. e.g. in UML Class Diagram both extension app and iPhone app would be represented as UML Class
You can, however, create your custom diagram mixing whatever UML artifacts you need - to make your design message clear to the readers
-Node represent the physical part of the system. for instance , server ,network and printer etc.
-Component represent any part of the system it might be physical aspect such as libraries ,file ,executables,document,packages etc that reside on the node.
-Component - refers to a module of classes that represent independent systems or subsystems with the ability to interface with the rest of the system.so it tells who does the system functionality.
Components are things that participate in the execution of a system; nodes are things that execute components.
Components represent the physical packaging of logical elements; nodes
represent the physical deployment of components.

How to draw a UML package diagram properly?

I'm trying to simulate my packages using the UML package diagram:
Package diagram:
I've one web app and two desktop apps whom use RPC to comunicate with remote components. Is this how to draw a package diagram
So, continuing are conversation from the comments, here goes the diagram:
Please take a carefull look and give me your feedback. Especially on the pink note with my questions.
As you can see, I used components instead of the packages in order to be able to eventually add a deployment diagram and assign the components to corresponding nodes. Although package diagram is also valid, it does not permit eays traceability to nodes of the desployment diagram.
Note the interface of the DBAccess component. In this case it indicates the RPC nature of the dependencies.
Furtner you can add on or more class diagrams for each component, modelling their internal structure. Be sure to respect the interface in this case and show classes with interface.
UPDATE (after the 1st comment)
Fixes:
WebApp spaks directly to the DB
B and C communicate via sockets. C is a socket server and B initiates the connection (client). Note that this is a plain unidirectional dependency. In case that both can open the connection, just draw another interface, as provided by B (symetrical situation).

Associations between components in UML Component Diagrams

Suppose that I am designing a distributed application:
It is composed by one host, that is the frontend web service of the company (CompanyWS), and one or more hosts, say three, that are the distributed warehouses of the company. Each warehouse is a web service (WarehouseWS) and provides one interface, for instance IWarehouse.
Well, because a UML component
[...]represents a modular part of a system, that encapsulates its content and whose manifestation is replaceable within its environment. A component defines its behavior in terms of provided and required interfaces
the web services can be seen as components.
In a UML Component Diagram how can I express the semantic that the CompanyWS can be plugged to one or more WarehouseWS? Is an association between the components the right way?
In the UML 2.4.1 Specification it is possible to use ports with multiplicity between components. See page 188, OMG Unified Modeling LanguageTM (OMG UML), Superstructure, Version 2.4.1
So you could define the Warehouse Port (wp) with cardinality [0..1] and the provided interface IWarehouse on component WareHouseWS. On the Component CompanyWS you define the Company Port (cp) with cardinality [0..*] and the required interface IWareHouse.
wp : IWarehouse [0..1]
cp : IWareHouse [0..*]

UML - Hybrid between component and activity diagrams

I currently work on a rather large system that consists of a WinForms app that uses WCF services and a database at the bottom. If you think about a use case or a requirement, what a developer needs is a quick overview of the implementation of that particular use case (or requirement). A person who knows the systems could very quickly verbally explain that these two views (or subviews) are used in the UI, they are data-bound to this controller, which uses this WCF service to get this DTO. The service uses this business class, which uses this data adapter, and the data is in these tables in the database.
I think in most cases it would be possible to convey all this information in a single diagram. However, it would be a kind of a hybrid between component and activity diagrams as it shows both workflow and the components that are involved. UML obviously doesn't have such a diagram, but I was wondering if anyone has done anything on these lines and what tools you have used.
I dont think activity diagram is appropriate here. Activity diagrams, as far as i believe are intended for somebody to understand how the module/system works without getting into the technical part. But then if you can express all that what you said in an activity digram and if your team and your audience are able to decipher things, then sure. Getting back to your scenario, i have done this before and a UML sequence diagram has helped me here. A sequence diagram depicts sequential object interactions. You might wanna check it out

Model an information system which communicates with other information systems in a UML-diagram?

I have to develop an integration concept to integrate my software as a subsystem into an enterprise information system which communicates with other information systems in other institutions.
I want to show a diagram which explains how the several subsystems are connected and which data is communicated between the subsystems. My problem is that I'm not sure if there is in the UML language a diagram-type that supports modeling of complete information systems.
I thought about the deployment diagram, but I am not sure if it is the right. I don't want to start an then recognize that it is the wrong way.
Is there any advice which diagram should be used, or if there is an alternative modeling language for complex information systems?
A component diagram is what you want - see chapter 25 of "The Unified Modeling Language User Guide".
I want to show a diagram which explains how the several subsystems work together and which data is communicated between the subsystems.
I'd probably start with a conceptual sequence diagram.
So, for example, you could have your lifelines represent the various components that you're integrating with, and your interactions could be any of the messages that need to transfer to and from those components.

Resources