Message order in UML 2.0 sequence diagrams - uml

How the order of the messages is modeled in UML 2.0 sequence diagrams?
I've browsed the UML 2.2 Superstructure specification and the only structure I found to model order is the GeneralOrdering class. I'm modeling my system with Papyrus, but it doesn't insert message ordering information automatically, so I miss guidelines on the use of this class.
I had the idea to test other tools and check the XMI output, but those that exported the sequence diagram properly used proprietary extensions to model message order. I tried Umodel, astah*, Enterprise Architect, PowerDesigner, Software Ideas Modeler and Visual Paradigm.
Any hint?

Don't use Papyrus with the sequence diagram because it doesn't really work well. It is impossible to create a diagram with this tool. The other tools you mentioned are a lot better.
After studing all the market tools my conclusions are:
The best sequence diagram on the market is RSA IBM.
The best Class diagram is Omondo EclipseUML.
The best usecase diagram is RSA and Visual Paragdigm.
By the way the xmi model of the sequence diagram has never been a success and is really a mess. Except the sequence diagram all the other diagrams at really well-done at model/xmi by the OMG specification of UML 2.3.
Really good specification but sequence diagram was and is still a misery !! s

I asked the same question in Eclipse Papyrus's forum, where I got the following answer:
"I'm not sure about the specifics of Papyrus, but in the UML specification, the 'fragments' relationship from Interaction to InteractionFragment is ordered (Figure 14.3), so that determines the order of the messages."
Follow this link for the full message.

Related

Software designing process with UML

When designing for a software, what is the correct order of UML diagrams we have to do? Starting from the Use Case diagram, what would be the next diagrams until we have enough to start coding?
UML is just a modeling language, not a software development methodology. A well-known methodology that provides guidelines for using UML in its software development process is the Rational Unified Process, although its popularity has declined. Still, it is not easy to determine the order of the UML diagrams prescribed by RUP from the available material provided by IBM. I have written a paper http://admiraalit.nl/admiraal/WhichUMLmodels.pdf which may help you with that.
For a simple application, a class diagram and a component diagram may be enough, but it depends very much on the type of application.

Are you modeling or drawing? in uml

Please I need help in understanding this two approaches in the uml world. I am a programmer who is new to uml. I just started learning uml lately but kept getting this phrase asked all the time. - Are you modelling or drawing?. An explanation is needed with clear examples.
This link hinted just a little but I am stil confused -- http://modeling-languages.com/drawing-tools-vs-modeling-tools/
UML is a modeling language, which has a graphical notation. Its semantic is precisely specified by UML 2.5 standard of the OMG and also the international standards ISO 19505-1:2012 and 19505-2:2012 (although the latter corresponds to UML 2.4.1).
THere are two different approaches to UML diagramming. And it's heavily influenced by the tools you use:
Drawing tools generally offer UML shapes to be used in drawings. But there is no deeper meaning behind the shapes. It's only pictures. These tools would allow you to mix a use case with a class or an actor in a deployment diagram. The advantage is that you can do what you want. The inconvenience is that what you want may not be compliant.
Real modeling tools let you combine only valid UML elements together and ensure consistency of what you draw with the deeper meaning of the UML language. And they build a true and comprehensive model behind the scene by combining all the facets of the different diagrams.
Modeling tools can do smarter things. They can relate for example a class to their object instantiations in sequence diagram. They can help you to find all the other models in which a specific class is used. If you rename a class or add a property in one diagram, it'll be automatically reflected in all the others.
Modeling requires more discipline, but it's more powerful in the end. Some modelling tools can even use their understanding of UML to generate code out of the model.
You can use UML diagrams in very free way and you can use them up to the specifications. There are even different UML tools - some support only free style diagrams/drafts, some check dependencies and correctness and thus create models. There are some tools in between (MS Visio is one of them)
Nothing is ideal and fitting for everything. For example, some strict tools (VP and EA) forbid to make number-named classes, but according to UML specification you MUST use number names for anonymous classes. But -sigh- we have what we have.
Use of UML as such is not strictly predefined. So, you can use it for freehand drafts, later work on them more thoroughly and make them models. Or do only drafts. Or only models. But at any moment you should know how strictly are you keeping up to specifications. Or at least, trying to keep up. But even very free draft can help you greatly to understand the task or to think in a more productive way.

UML diagrams required to generate code (reverse engineering)

I do know member may say this is same question but here my intention is to know the real people who used it, I don’t want any link to tool, I just need to know w**hich are the UML diagrams required to generate code..thats it**
I have seen probably read and hear many things about reverse engineering with UML. As far as I understand: UML diagrams transform probably generate basic code for you (may be with single click). I am just wondering whether it’s REAL? Anyone has used it? Which are the tools we need to look and probably best to use?
We use only class and state diagrams to generate code. See http://www.state-machine.com/ in addition to Enterprise Architect mentioned in the other post.
This Stack Overflow question seems to be duplicate to your question Is there a MDSD/MDA success story for a real world application?
There are 54 questions in the mda Stack Overflow tag that you may find useful
On one project we used class diagrams and deeply nested state diagrams to generate both structural and behavioral backbone of our C++ application using the Sparx Systems Enterprise Architect and its code engineering and MDG (Model Driven Generation) technologies.
Their MDA Tool for Model Driven Architecture was not available at that time.
For an example of what the tool can do with otherwise just pictures (e.g. Visio treats UML models as just pictures) look at 20 minutes long video webinar Simulation and Prototyping in Enterprise Architectat http://www.sparxsystems.com/resources/webinar/webinar-series.html

Database design using UML

I want to design a database.I heard UML is one of the way.
What is the advantage in using UML?
When should I decide I have to use UML ? and also after generating the code from model how should I proceed?I'm using UML studio for designing the database.
There are many advantages but it mainly depends on how you use it and to what purpose. The first is that by means of a graphical modeling language it might be easier to look at the whole database architecture and possibly find improvements. The second important reason is that being platform independent you can, in principle, generate different artifacts supporting your database implementation (i.e. SQL scripts, Data Access Objects, documentation, etc.)
Now I don't know UML Studio but in Eclipse you can use Papyrus to model your DB architecture (a stereotyped class diagrams should be enough) and Acceleo to define and execute your own model to text transformation workflows.
This may help you
http://lowcoupling.com/modeling
http://lowcoupling.com/post/47802411601/uml-diagrams-and-models-with-papyrus
http://lowcoupling.com/post/47347056110/models-to-text-transformations-with-mofm2t-and-acceleo
I'm a big fan of UML, but UML diagrams are not the best solution to model databases, and especially Entity-Relationship. In fact all the best UML modeling tools support ER diagrams, too (besides many other types of diagrams). Yes, class diagrams can be used in a similar way, but ER diagrams offer a better visualization and support specific presentation options; you can define the type of each attribute among those supported by the specific DBMS you are using. I love Visual Paradigm, as UML and ER tool, but it's only my taste. Normally you have other nice options in advanced IDE supporting DB modeling, like real DB reverse engineering, SQL generation, support for physical and logical models (using different data types), and so on.
I would use a class diagram to model a DB only if I can't use another tool supporting ER diagrams.
Hope this helps!
Luca

Advantages and disadvantages of BPMN?

I was hoping you could tell me what the advantages and disadvantages of BPMN are in a developers perspective.
I'm comparing UML with BPMN and a found a bunch of advantages and disadvanteges for UML but none for BPMN.
It's largely down to audience and purpose. In terms of modelling language, BPMN and UML activity diagrams cover pretty much the same conceptual space with different notations. The notation thing gets religious very quickly. I personally prefer AD notation over BPMN - but it's a very personal thing.
Broadly speaking, BPMN tends to find favour with those coming from a business process modelling / business analysis background. UML ADs tend to be favoured by those coming from a software perspective. Tool support tends to mirror this: the high end process modelling tools (casewise, aris, etc.) are more likely to support BPMN; software modelling tools (MagicDraw, Sparx, etc.) favour UML. However there's increasing crossover there. I've used both with business stakeholders with no issues in either case.
Finally is purpose. Are your diagrams going to be for human consumption only or used as a specification for some form of analysis/code generation? If it's not just pictures then your tool chain may well be the deciding factor.
If you want a more detailed description of the differences, have a look at the answer in this forum post.
A new BPMN Profile has been discussed at the OMG. UML can easily generate code even with an activity or state diagrams. You just need to add stereotypes in your model then a parser will take the xmi and create code. The OMG specification will define which stereotypes should be used and why. Really a very good idea !!
In my company we have stopped using BPMN and are only focus on the activity diagram which is more accurate because built on the top of a standard language. Having also class diagram, usecase and activity diagrams allows to model faster.
We get a running code from our activity or state diagram. We debug with our class diagram.
We use the same metamodel for all diagrams and therefore can trace activity to code implementation and through class diagram. I mean that the code is reversed once generated and then we check all requirements and the architecture in order to have a nicer object architecture.
Everything works well :-)
We are now waiting for the new profile specification and will implement the needed stereotypes in order to cover BPMN.
My answer to your question is that we don't need anymore BPMN and should move on to UML 2.3 BPMN profile implementation.
BPMN is for modeling business process flow, isn't it? That's not exactly what UML is for. The goal of UML is to model a software from different view and ultimately not to have to code it (yes that's kind of ideal).
The main arguments for BPMN from a business perspective are usually:
When building BPMN diagrams from scratch with many stakeholders, it is ok to mix tasks of different levels of hierarchy, which can be detailed out or summarized later.
The basic language elements can be thought quickly even to a non-technical audience.
The developers can immediately start working and attaching source-code and scripts to the BPMN-diagram by workflow and business process management software like Camunda.
The main drawbacks are that
The initial BPMN sketch (usually by the business) usually needs many iterations to arrive at a diagram which allows for implementation.
It is not straight forward to represent different roles since the usual concept of lanes in pools might not be enough or lead to huge diagrams, see e.g. BPMN: multiple roles in a row
See the MDA on OMG (Model Driven Architecture):
- we use BPMN only for Computation Independent Models (CIM)
- we use UML only for Platform Independent Model (PIM, high level design) and Platform Specific Model (PSM, low level design).
- using BPMN for any "software systems" or UML for "business" have no sense (see UML v.2.5)
- for developers: we can make transition from BPMN business process to Use Case, it is good tool for defining scope of requirements for software https://www.visual-paradigm.com/tutorials/from-business-process-to-use-cases.jsp
If you are looking for similarities, both UML and BPMN diagrams can be described using text.
PlantUML
BPMN Sketch Miner

Resources