jerosoler / Drawflow

Simple flow library 🖥️🖱️

Home Page:https://jerosoler.github.io/Drawflow/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any way to designate True/False outputs for custom nodes?

aleybovich opened this issue · comments

I have a flow logic in a YAML file with "condition", "action", and "terminate" blocks. Condition block makes a calculation and then triggers a linked action block on a True or False path. Something like this:

flowchart TD
    C{Condition2} -->|Yes| D[Action1]
    C -->|No| E[Action2]
    E --> T1((( ))) 
    D --> F{Condition2}
    F -->|Yes| G[Action1]
    F -->|No| T2((( )))
Loading

I need to be able to create such flow charts, and distinguish Yes/True and No/False outputs for Condition elements. When I export the model, i need to be able to parse and know which connection is True and which is False. Any ideas how to implement that?

View for vertial desgin:

For labels:

Detect Yes or No:
The first output of the node would be true "output_1" and false "output_2".
You can get the information about each node with: editor.getNodeFromId(id).

Shaps: