Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Duration Constraint #58

Open
MrCoder opened this issue Sep 17, 2023 · 1 comment
Open

RFC: Duration Constraint #58

MrCoder opened this issue Sep 17, 2023 · 1 comment

Comments

@MrCoder
Copy link
Collaborator

MrCoder commented Sep 17, 2023

Duration Constraint

A constraint on a duration.

#Notion
A duration constraint on a sequence diagram may be show by drawing a vertical line with open arrowheads at both ends between the vertical position of two events. An expression for the duration is placed in braces over the center of the arrow. The constraint may also be shown as a text expression in braces.

image
Source: https://www.oreilly.com/api/v2/epubs/0321245628/files/0321245628_ch14lev1sec193_image01.jpeg

@MrCoder
Copy link
Collaborator Author

MrCoder commented Sep 17, 2023

Proposed DSL

// {<1sec.}
"caller:Phone" -> "exchange:PBX": lift receiver
// {<10 sec.}
"exchange:PBX" -> "caller:Phone": dial tone
"caller: Phone" -> "exchange:PBX": dial digit r=duration
...
// [duration] {<5sec.}
"caller:Phone" -> "exchange:PBX": route
"exchange:PBX" -> "caller:Phone": ringing tone

Explanation on the DSL:

  1. the labels like a = now only add noise so are all omitted.
  2. Use a special comment for a message to specify the duration:
    2.1. If it is a sync message draw the line near to the receiver's execution bar;
    2.2 If it is an async message draw the line near to the sender's lifeline from the commented message to the first message sent to it.
  3. {r < 10 ms } is not represented in the DSL. It can be either in the message or comment.
  4. Use // [duration] to draw the message pointing downwards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant