Linking a Provided Interface to a definition in Sparx Enterprise Architect (EA) - components

I defined my software system using EA. I stayed mainly at the high level so far. The software interfaces between my components are represented as Structural Elements "Provided Interface" (the little purple bullets) and "Required Interface" (the little sockets).
Now, I would like to go a little bit further into the details, and define the API corresponding to each of these Provided Interfaces, ideally as a class diagram. It would be perfect if I were able to create a nested composite structure diagram for each of these Provided Interfaces, like for software components for example. But it seems that EA does not enable that.
What I do is that I create an Interface nested in my software component, then I link the Required Interface (the purple bullet) to my Interface (purple square) with a Dependency link. Then I can create a nested composite structure diagram in my Interface. But I doubt this is the optimal method.
Can someone tell me what is the "EA-approved" way of defining Required Interfaces ?
Thank you :)

You can directly select the Interface in the ProvidedInterface or RequiredInterface without needing to explicitly create a Realize or Dependency connector to the target interface.
You can do this as shown in the figures below:
One advantage of this is that you do not have to show the actual target interface on the same diagram as the components while still being able to navigate to them. This becomes handy when you have components that provide or require many interfaces (and you do not want to clutter your diagram). With this approach you can use the Find | Locate Classifier in Project Browser context menu and directly jump to the composite diagram.

Related

understanding dependency relationship in UML component diagram

I'm struggling at understanding UML component diagram.
I've just been through the "assembly connectors" and here's what I (think I) understood:
the circle represents an interface, which I understand as a set of functions that a component can offer to the others.
the half-circle... well, don't know how to call it, but it says something like "there's some functions I need in order to operate correctly". In the image, I guess that an order must have access to functions that return details of the Customer (e.g: methods GetName(), GetAddress(), etc.), that's why it has the assembly connection with the Customer Details interface, provided by Customer.
My question is: why is there a dependency relationship arrow from the interface which Account provides (AccountDetails) and the interface which Order requires (Payment)?
The link of this image doesn't explain it.
The assembly connector (two shown on top) is a kind of provisional concept. You know that there should be an interface used instead, but have not yet made up the details. This is a connector which looks like socket/lollipop. But it's a connector.
The separate lollipop/socket are concrete interface uses. These are real elements. The interface itself is not actually shown (you will have a separate diagram showing the details). But to make clear that the depending interface is related to the providing one you draw a dependency.
Simply spoken, the above is something in the middle of a design phase. Finally all assemlies should be replaced by provided/required interfaces.

How can I version software components in Sparx Enterprise Architect (EA)?

I am working at modelling a software system using Sparx Enterprise Architect 13. This system contains different versions of software components. We typically add services and/or APIs when we release a new version of a software component.
Currently, to reflect the fact that component ServiceV1 exposes an interface A and ServiceV2 exposes interfaces A (the same as ServiceV1) and B, I make ServiceV2 extend ServiceV1. But that is not straightforward:
the generalization link is not available in diagrams between components, so I have to use Advanced > Parent...
it lacks flexibility, because I cannot override interface A with a newer version of the interface
Is there a better way to do so? What is the standard way of maintaining several versions of the same component?
Thank you!
I don't think this is standardized by some standards body, but I would recommend to introduce two levels of abstraction: the unversioned component level and the versioned component level.
On the unversioned component level, you have just a single element in the project repository for each component (not for each component version).
On the versioned component level, you have a single element in the project repository for each version of each component.
Each versioned component, e.g. MyComponentV2 has a ≪trace≫ dependency to the unversioned one, e.g. MyComponent.
To prevent unnecessary design work, you may decide to draw relationships between different components only between versioned component elements, not between unversioned component elements, or only vice versa. But this depends on the needs of your organization.
When you create a new version of a component, you copy the most recent version of the component (MyComponentV2) with all its connections, including the ≪trace≫-dependency to the unversioned component (MyComponent) and give it the right name (MyComponentV3).
I have applied this in a large project.
Actually there is no standard for modeling such a scenario. At best you can have conventions - which may differ from domain to domain. However, here's how I would model it:
ServiceV2 has a <<trace>> relation to ServiceV1. UML 2.5.1 says on p. 682:
«Trace» | Abstraction | Specifies a trace relationship between model elements or sets of model elements that represent the same concept in different models. Traces are mainly used for tracking requirements and changes across models. As model changes can occur in both directions, the directionality of the dependency can often be ignored. The mapping specifies the relationship between the two, but it is rarely computable and is usually informal.
So that should mean in this context ServiceV2 is created using ServiceV1 (I formerly used <<derive>> here since it seemed logical. But actually the UML semantic is defined differently; see p. 680 of UML 2.5.1). You could well invent your own stereotype here and explain it in the domain context (e.g. <<version of>>).
You would probably create a copy of ServiceV1 or model it manually as new element (you don't do that on a mass scenario, do you?). Here I added provided interfaces that both realize the common interface A. The quick linker does not offer those relations. You need to either go the clumsy Ctrl-I way or you grab the realization from the toolbox.
The <<derive>> dependency is not offered directly (unless you have your own MDG and defined it in QL or toolbox). So you create a dependency and choose derive from the stereotype menu.
This is a broad field and versioning is not as simple as just adding a numbering schema. In any case if you create a new component it will be something different. So the <<derive>> is probably the best option here.
EA supports this. See documentation of "Time aware models" here:
https://sparxsystems.com/enterprise_architect_user_guide/13.0/model_domains/time_aware_models.html
Allows maintaining separate versions of each package

Nested components in Sparx Enterprise Architect (EA)

I am trying to model a software system using Sparx Enterprise Architect 13. In our system, the software components are divided into sub-components (nothing extraordinary).
I know precisely what interfaces the sub-components provide, require and how they are interconnected. So in my model, all the links are defined at sub-component level and not at a component level.
Now, I would be able to produce diagrams representing the big picture, whose elements would be the components and not the sub-components. The idea would be to drag my existing components into a diagram to be able to see the links between them, automatically populated from the links that I have already defined between sub-components.
I found no way to achieve this goal, and I have tried using the following EA element combinations:
components containing other components
packages containing components
packaging components containing components
components containing ports
Is there a way to do that in EA ?
Thank you :)
What I do is to actually use ports on components. An outer component
is set to be composite (note the lying 8 bottom right). When dbl-clicked it will open the composite diagram showing the inner structure like so (the layout must be arranged manually by enlarging the outer and positioning the inner):
Required/provided interfaces can and should be added to the ports as needed. And of course they can be shown and hidden in different diagrams as well.
They key to it all is the composite diagram (context in browser: Add/Composite) which in the end will create a navigable model.
Ports and interfaces can be created via context Structural Elements.
Note: To make an element composite you need to right-click in Project Browser | Add | Composite Structure Diagram. That goes for V13.5 and many other versions (it had been different in the past). And you never know in which place some EA developer will put that functionality in the next version :-/

Component diagram for a cooperative multi-robot system

I would like to make a component diagram for a multiple robot coordination system.
I would like to show on the component diagram that the sub-component "Perception" of each "Robot" component communicates through an interface with each other. Indeed, the sensors of all robots are used in order to estimate the position/velocity of each robot, it is a cooperative sensing.
How can I do that ? Should I have an interface which would be both provided and required by the component "Robot" ?
Thanks.
For this type of system you are in position to use full power of UML and make really effective documentation. You will most likely need some (or all) of the following diagrams:
Component diagram - to show the "big picture" and the main parts of your system ant their interfaces and dependencies. Components are "black boxes" here and will be detailed in the following diagram
Composite structure - are perfect to open up the components and show their internal structure. You can take "black boxes" and their interfaces as kind of input to this work. Each component (except the external ones) should be modelled internally. This kind of diagrams lets you use the whole-part paradigm to model internal structure as a network of interconnected elements. Previously detected interfaces will be used here to show how they are actually implemented.
Class diagrams. If you need to further specify the elements of internal structure (their attributes, methods, associations, etc), this is the diagram to draw.
State machines. In embedded real-time systems, lots of classes are active and have states. Identify those classes (or even components) and use state diagrams to show their internal logic.
Sequences and interactions. These diagrams will help you to specify how different elements of your system work together to implement different scenarios.
Deployment diagram. As robot is a piece of hardware and these components run on it (or them, if there are more than one hardware node) you might want to show how the components are distributed over the hardware structure.
You could also have a look on timing diagram, relativelly new one, designed especially for real-time systems. It might come on handy if you need to express time restrictions, durations, etc.
If you are new to UML, I would recommend to start with components and deployment. They are relativelly easy to learn. As you feel understanding and need to express your ideas further, dive in the composite structure and states. And finally classes.
Have fun!
EXAMPLE
This is how I understand your model and its elements. This extends my comments.
Explanations are in comments and in the diagram notes.
A component diagram:
A component instances' diagram:
Note that the first diagram should be extended with the "connectivity rules" that define all valid connectivity possibilities. Is there only one CentralManager? Must each Robot be connected to CentralManager? Can a Robot talk to itself? And so on...
These and other questions should be modelled separatelly. On class diagrams benavior diagams, according to concrete details.

Components in Component Diagram UML

I am very confused on what are these "components" should be. I am just starting with UML by the way. I don't know what components should be used or be place in the diagram. I've searched for definitions about these components and they are very hard to understand. Can you please explain it in a very simple way on what these components should be?
P.S.: This component diagram will be about a website. A planner website.
I can't post what I had in mind because I am a new user and new users aren't allowed to post images.
The way I think of them is as a large, logical, chunk of the functionality of a system; a bit like that which might be found in a single library or a .jar file. They tend to be associated more with software intensive systems distributed over multiple nodes (computers) and locations. They idea is that they interact, mainly, through well defined interfaces and that they can be replaced or "swapped out" with another component that will do the same job. An example would be changing to a different database management system, or updating some hardware drivers.
Components are used most in component and sequence diagrams.
I believe there is a debate as to what the real the differences between components and classes are. Both are specialisations of the concept of a classifier in UML
In your case —without knowing much about the specifics— you might have the following components with interfaces between them:
a web client component
a business/problem logic component or components
some sort of data management component.
At the end of the day though, you use the UML in whatever way works for you. A simple software project might not benefit at all from using component diagrams. It's up to each project team to define what context and level of abstraction they are working at and choose diagram types accordingly.

Resources