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

SequenceDiagram: 3+ Alternative Paths #348

Closed
michaeltlombardi opened this issue May 4, 2016 · 3 comments
Closed

SequenceDiagram: 3+ Alternative Paths #348

michaeltlombardi opened this issue May 4, 2016 · 3 comments

Comments

@michaeltlombardi
Copy link

michaeltlombardi commented May 4, 2016

Overview

Is it possible to have multiple alternate paths in a sequence diagram?

e.g. If A then X, else if B then Y, else if C then Z.

If not (and my tests to do so failed), is this functionality that it makes sense to add?
Example below.

Example

sequenceDiagram
Participant alpha
Participant bravo
alpha->>bravo: request resource
alt has resource
    bravo->>alpha: return resource
else does not have resource
    bravo->>charlie: request resource
else resource blacklisted
    bravo->>alpha: return error message
end
Loading

Edit: Initially posted the wrong example.

@michaeltlombardi michaeltlombardi changed the title SequenceDiagram: Nested Alternatives SequenceDiagram: Multiple Alternatives May 4, 2016
@michaeltlombardi michaeltlombardi changed the title SequenceDiagram: Multiple Alternatives SequenceDiagram: 3+ Alternative Paths May 4, 2016
@knsv
Copy link
Collaborator

knsv commented May 8, 2016

Sorry that is currently not possible

You can do single else statements though as in the example:
http://knsv.github.io/mermaid/#alt

And... Yes it would make sense to add it. I would welcome a pull request with this. 👍

@michaeltlombardi
Copy link
Author

I've got the javascript skills of a toddler, but I will look into this in the future, time permitting.

@tylerlong
Copy link
Collaborator

@sechel sent a PR to add this feature!

mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
…yarn/develop/js-base64-3.6.2

chore(deps): bump js-base64 from 3.6.1 to 3.6.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants