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

UI: Flow variable ports/Node configuration #65

Closed
reelmatt opened this issue Apr 18, 2020 · 0 comments · Fixed by #82
Closed

UI: Flow variable ports/Node configuration #65

reelmatt opened this issue Apr 18, 2020 · 0 comments · Fixed by #82
Labels
enhancement New feature or request

Comments

@reelmatt
Copy link
Member

KNIME

In KNIME, local flow variables can be connected through special "flow ports", identified as red circles. Each node, regardless of the number input ports included, has a input port for a local flow variable.
Screen Shot 2020-04-18 at 5 17 19 PM

PyWorkflow

The StringNode is currently the only FlowNode we have defined for PyWorkflow and it uses standard ports/edges as the other Nodes do. Depending on how the new "flow ports" are implemented, some back-end logic may need to change. How it currently works (on execution) is:

  1. Any preceding data is loaded. This includes a node_type != FlowNode condition so only Nodes with data (not flow variables) are included.
  2. FlowNodes that are defined in a Node's option_replace attribute are retrieved and passed to the node.get_execution_options() method. This retrieves the default_value of each FlowNode and creates a new Parameter that the given Node will use.

Connecting a FlowNode to another Node through a flow port does not automatically substitute the value for a given parameter. Instead, it allows the FlowNode's variable to be selected as an option to replace a parameter. Parameters include all global variables, and the optional local flow variable, as options to select from.

One proposal for how to implement this visually is this wireframe
Node configuration 2
where a flow variable can be selected through a dropdown select and enabled/disabled by a checkbox. Alternatively, an empty or blank choice in the dropdown could signify no flow variable overrides.

For the front-end to retrieve all flow variable options, the endpoint GET /node/<node_id> can be used to retrieve the current user-specified options, and all currently defined (local and global) flow variables. Node information is stored in the retrieved_node attribute, flow variables are stored in the flow_variables of the JSON response.

@reelmatt reelmatt added the enhancement New feature or request label Apr 18, 2020
@reelmatt reelmatt changed the title UI: Flow variable ports UI: Flow variable ports/Node configuration Apr 18, 2020
@reelmatt reelmatt linked a pull request May 4, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant