Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Sequence Diagram(Move within the Lifeline-Layout)
Sequence Diagram [message #1848028] Wed, 17 November 2021 15:17 Go to next message
Antonio Garmendia is currently offline Antonio GarmendiaFriend
Messages: 93
Registered: May 2014
Member
Hi all,

Recently, I just start with some tutorials regarding the implementation of a sequence diagram for your custom language using Sirius. Basically, inspecting the example of the interactions and [1].

Currently, I am trying to develop a language that should look something like this:
index.php/fa/41331/0/

Basically, it is data that passes from one layer to another. The root is the Pipeline that contains the layers and the layers contains the different methods. Each method should reference one Data or a set of Data.

At this moment, I have two problems:
1. I am not able to move the data elements within the lifetime. Right now, the last data element is only shown on the diagram. I think that I do not understand well the endsOrdering and the Instance Role Ordering :-/.

2.It would be possible connect/disconnect elements by the size. If I have a representation like in the figure and I reduce the size of Layer1/S1 element then, I will like to remove the connection of Data3 and S1. Is that possible?

I uploaded the pipeline example, just in case someone has time to take a look at it.
I am using Sirius 6.5.1.

Thanks for any help!

Kind regards,
Anthony

[1] https://www.eclipse.org/sirius/doc/specifier/sequences/Sequence%20Diagrams.html
Re: Sequence Diagram [message #1848043 is a reply to message #1848028] Thu, 18 November 2021 09:37 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Anthony,

The instanceRole ordering is used to synchronize the graphical horizontal layout (order of the lifelines) and their semantic order in the model.
The ends ordering is used as a global ordering to synchronize the graphical vertical layout (order of all displayed "events": start/stop of executions, messages, ...) and their semantic order in the model.

You will not have the possibility to align execution starts between two lifelines: the layout will always put at least 5pixel : we consider that two "event ends" cannot occur at the same "time"/y.

1.: this means that you might have an issue around you mappings and orderings.
2: the "reorder" tools are called when you move/resize elements, if the ordering has changed, one lead might be to add additional cleanup of the model it those tools.

I will try to take a look to your zip.


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Sequence Diagram [message #1848044 is a reply to message #1848043] Thu, 18 November 2021 10:18 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Anthony,

Your starting/finishing ends expressions for the execution mappings should reference the elements you consider as start/end events of the current pipeline::Method.
Your SequenceDiagramDescription::endsOrdering is currently set to aql:self : it shoudl corresponds to a global ordering of all start/ends of the elements which will be created by the Execution mappings (and also any Sequence specific mappings with the ends expressions).
In order to have Sequence correctly working, you need to have unique start/end for each "execution" and those elements globally ordered in the SequenceDiagramDescription endsOrdering expression result.
If you switch the outline to tree mode, you will see one item for each graphical element : the diagram content seems correct, only the Sequence Layout is broken : you need to fix the orderings and ends expressions.

Then I see that you have defined an Edge mapping, it will not be layouted by Sequence, only "Message" mappings are handled.

Your Viewpoint might need to be renamed : PepilineViewpoint ->PipelineViewpoint.

Regards,




Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Sequence Diagram [message #1848096 is a reply to message #1848044] Fri, 19 November 2021 14:50 Go to previous messageGo to next message
Antonio Garmendia is currently offline Antonio GarmendiaFriend
Messages: 93
Registered: May 2014
Member
Hi Maxime,

Thanks a lot! Sorry for the late reply, but I am still struggling with some concepts that unfortunately I still do not understand well. My doubts are the following:

1. SequenceDiagramDescription::endsOrdering. I am struggling in trying to debug the interactions example, but unfortunately I still do not understand how exactly it works. I still do not know what I should return here. So, Imagine that I have a model like the above figure, then, What I should return in the endsordering? Something like this: Data1, Layer1/U1, Layer2/S1, Data2, Layer1/S1, Layer2/S1, Data3, Layer1/S1, Layer2/U1.

2. My other doubt is regarding the execution of the DataNode. What I should return in Starting End Expression and Finishing End Expression? It shoud be something like this for Data1:
-Starting End Expression: self
-Finishing End Expression: Layer1/U1
I would say that this is also one of my problems.

Hopefully, you can understand my questions.

Thanks!

Kind regards,
Antonio
Re: Sequence Diagram [message #1848297 is a reply to message #1848096] Fri, 26 November 2021 18:01 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Antonio,

The Sequence dialect makes the assumption that you have data in your model to identify those ends.

index.php/fa/41384/0/

I have represented the ends on a draft modification of your image:

  • each Sequence event (here only executions) has a starting end and a finishing end represented as red and blue disks.
  • the global ordering expected as result of SequenceDiagramDescription::endsOrdering would be :

    • 1.start,
    • u1_fromLayer1.start,
    • S1_fromLayer.start,
    • 1.end
    • u1_fromLayer1.start,
    • 2.start
    • S1_fromLayer1.start
    • S1_fromLayer2.end
    • 3.start
    • u1_fromLayer1.start
    • 3.end
    • u1_fromLayer2.start
    • S1_fromLayer1.end:



Sirius Sequence diagrams will not be able to align your executions : it makes the assumption that there correspond to different time event : there will be a 5pix minimum gap between each "end".

Regards






Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

[Updated on: Fri, 26 November 2021 18:02]

Report message to a moderator

Re: Sequence Diagram [message #1848741 is a reply to message #1848297] Wed, 15 December 2021 18:04 Go to previous messageGo to next message
Antonio Garmendia is currently offline Antonio GarmendiaFriend
Messages: 93
Registered: May 2014
Member
Hi Maxime,

Thanks a lot! I think that I almost got it, but it seems that I still have some errors which I am not able to solve.

In order to accomplish what you mention in your last comment, I created a new meta-model to represent the EndsOrdering (project: at.jku.ends.ordering.mm). After this, I manually created a model (pipeline.endsordering) that gives you this ordering. Then, I change the endsOrdering expression and the start and finish expression. However, It seems that is not correct because I got this error:
java.lang.IllegalArgumentException: The lower bounds must be less than the upper bounds.
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142)
	at org.eclipse.sirius.diagram.sequence.util.Range.<init>(Range.java:61)
	at org.eclipse.sirius.diagram.sequence.business.internal.layout.vertical.SequenceVerticalLayout.layoutLifelinesWithoutCreation(SequenceVerticalLayout.java:495)


I uploaded the updated pipeline example and the endsordering meta-model, just in case you have time to take a look at it. The project at.jku.pipeline.sample has the pipeline (My.pipeline) and also the model that represents the ordering (pipeline.endsordering).

Thanks again!

Kind regards,
Antonio

Re: Sequence Diagram [message #1848886 is a reply to message #1848741] Wed, 22 December 2021 10:48 Go to previous message
Antonio Garmendia is currently offline Antonio GarmendiaFriend
Messages: 93
Registered: May 2014
Member
Hi,

It seems that I figure out what was the problem. At least in this example, this problem is raised because the Square Style that belongs to the Execution Lifeline does not have a definition of Width and Height. Thus, I just put (Height = 20 and Width = 1), and then, it works like a charm.

Kind regards,
Antonio
Previous Topic:Viewpoint Selection is empty
Next Topic:Ready to use designers?
Goto Forum:
  


Current Time: Sat Dec 10 06:44:13 GMT 2022

Powered by FUDForum. Page generated in 0.02947 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top