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

Can a decision has 3 options #60

Open
jaishin opened this issue Sep 3, 2015 · 6 comments
Open

Can a decision has 3 options #60

jaishin opened this issue Sep 3, 2015 · 6 comments

Comments

@jaishin
Copy link

jaishin commented Sep 3, 2015

It seems just yes/no decision, is it possible a one/two/three decision?

@adrai
Copy link
Owner

adrai commented Sep 4, 2015

unfortunately no...

@ekoz
Copy link

ekoz commented Dec 16, 2015

how to support more than two decision? now it is only yes and no

@dholcombe
Copy link

Enhancing flowchart.js to support N options from a conditional would make this useable in a much greater number of instances. As it is now, the limit to 2 branches per condition makes it unsuitable for any project I have ever worked on.

Is there an outline of a plan for adding more branches to a condition that someone could pick up and complete, then submit a pull request for?

@Stwissel
Copy link
Contributor

You are more than welcome to provide a pull request. An interesting challenge to solve is the visual. A decision is a diamond, one point is entry, so you might have 3 points for exit and you have the challenge of visualizing. Any switch statement at the end is a series of yes/no statements, so you can already render any workflow with it.

@barry-bookinglive
Copy link
Contributor

@dholcombe I have cases for "more than yes / no" and I've simply used multiple decision to decide if this is option 1, option 2, option 3, etc it makes a bigger tree but there isn't anything I don't think can be shown... obviously if you have something really really complicated then you'd need something equally more complex

@Serif-NNR
Copy link

Hello.
Any implementation was added to the master? I need to add multiple decisions too.
I haven't enough time to update it, however I would like to share a solution basically like following:

c2=>condition: Good idea|rejected
c2(true)->io->e
c2(false)->e
c2=>condition: Good idea|approved
c2(false)->st

Shortly, if we have a component defined same name before, the library can make same location of the copied second (if you like fourth) component and the oldest one. To use this structure, it can be allowed to define variables with same component type, if types will be changed, components except for firstly defined must be rejected.

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

7 participants