Book a Demo

Author Topic: Setting duration constraint in Seqeuence Diagram  (Read 9861 times)

mariop

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Setting duration constraint in Seqeuence Diagram
« on: June 08, 2023, 11:10:32 pm »
Hi,

I need to rebuild some sequence diagrams and have hard time finding a way to properly set duration constraint between messages as shown here:
https://imgur.com/qssmWvM

I can set the one marked in green my right clicking on first message -> Timing Details and then set comment to "Duration constraint between messages" field.

But how to define between which messages, I can't find. I only get to set duration constraint between two closest one.

Can someone shed some light here?

Thanks in advance!

Best regards,

Mario.



kundewayne

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
    • gorilla tag
Re: Setting duration constraint in Seqeuence Diagram
« Reply #1 on: May 20, 2024, 12:00:59 pm »
I'm delighted to help!

The problem is that the built-in functionality of sequence diagrams in PlantUML (or any other UML tool) does not allow you to specify a duration constraint between several messages directly.

However, there are a few solutions to achieve this:

1. **Use notes with comments**: Add notes to the sequence diagram and mention the duration constraint in the comments. For example:
'''Puml @startuml SequenceIn the diagram, participant A is identified as "Alice" and participant B as "Bob".
    A->>B: Message 1 "Duration constraint between messages 1 and 2: [0-5] seconds"
    B->>A: Message 2 ... @enduml '''
This allows you to add the duration constraint in the note without directly linking it to the messages.

2. **Use a custom archetype**: Create a custom stereotype for the messages and include a property that stores the duration constraint. For example:
'''Puml @startuml SequenceDiagram: Participant A is "Alice" and participant B is "Bob". A->>B: <<durationConstraint="0-5"> Message 1: B->>A: Message 2 ... @enduml '''
In this example, you would need to construct a custom archetype called 'durationConstraint' with a property 'duration' that accepts a range of values (for example, '[0-5] seconds'). You may then apply this stereotype to the messages for which you want a duration constraint.

3. **Use a separate diagram or table**: If you have a large system with numerous sequences and duration limitations, you might consider constructing a separate diagram or table to hold this data. This would allow you to keep your sequence diagrams focused on the primary flow of events while separating any supplementary information.

Keep in mind that while these workarounds may not be as beautiful as having a direct feature in the sequence diagram editor, they should help you achieve your objectives.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Setting duration constraint in Seqeuence Diagram
« Reply #2 on: May 20, 2024, 05:53:45 pm »
I'm delighted to help!

The problem is that the built-in functionality of sequence diagrams in PlantUML (or any other UML tool) does not allow you to specify a duration constraint between several messages directly.

However, there are a few solutions to achieve this:

1. **Use notes with comments**: Add notes to the sequence diagram and mention the duration constraint in the comments. For example:
'''Puml @startuml SequenceIn the diagram, participant A is identified as "Alice" and participant B as "Bob".
    A->>B: Message 1 "Duration constraint between messages 1 and 2: [0-5] seconds"
    B->>A: Message 2 ... @enduml '''
This allows you to add the duration constraint in the note without directly linking it to the messages.

2. **Use a custom archetype**: Create a custom stereotype for the messages and include a property that stores the duration constraint. For example:
'''Puml @startuml SequenceDiagram: Participant A is "Alice" and participant B is "Bob". A->>B: <<durationConstraint="0-5"> Message 1: B->>A: Message 2 ... @enduml '''
In this example, you would need to construct a custom archetype called 'durationConstraint' with a property 'duration' that accepts a range of values (for example, '[0-5] seconds'). You may then apply this stereotype to the messages for which you want a duration constraint.

3. **Use a separate diagram or table**: If you have a large system with numerous sequences and duration limitations, you might consider constructing a separate diagram or table to hold this data. This would allow you to keep your sequence diagrams focused on the primary flow of events while separating any supplementary information.

Keep in mind that while these workarounds may not be as beautiful as having a direct feature in the sequence diagram editor, they should help you achieve your objectives.

I guess you kinda missed the point that this is a Sparx EA forum.
Solutions for PlantUML are not really useful here.

Geert

Takeshi K

  • EA User
  • **
  • Posts: 632
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Re: Setting duration constraint in Seqeuence Diagram
« Reply #3 on: May 21, 2024, 09:17:52 am »
I suspect that the response is generated by an AI service, because (I think) we don't usually write 'I'm delighted to help!', but that is a common phrase for an AI's first response. (At least, the first reply by AI in Japanese language)

And the original post is not new. Maybe it is not difficult to write a script to get a post and send it to an AI service, then post the reply to the board automatically.
--
t-kouno