mirror of https://github.com/node-red/node-red.git
Updated Design: subflows (markdown)
parent
4208e912a3
commit
f5546e7ea8
|
@ -11,9 +11,8 @@ A subflow can be used in one of two modes: (this is tbd. Might just stick with s
|
||||||
|
|
||||||
1. User selects some existing nodes.
|
1. User selects some existing nodes.
|
||||||
2. Selects 'convert to subflow' option.
|
2. Selects 'convert to subflow' option.
|
||||||
4. Dialog opens to name the subflow.
|
|
||||||
3. Nodes are removed from workspace and replaced by a subflow node.
|
3. Nodes are removed from workspace and replaced by a subflow node.
|
||||||
4. Subflow node added to palette
|
4. Subflow node given a default name and added to palette
|
||||||
|
|
||||||
**Questions:**
|
**Questions:**
|
||||||
|
|
||||||
|
@ -27,6 +26,7 @@ A subflow can be used in one of two modes: (this is tbd. Might just stick with s
|
||||||
|
|
||||||
1. Double click subflow node.
|
1. Double click subflow node.
|
||||||
2. Opens in closeable tab containing the flow.
|
2. Opens in closeable tab containing the flow.
|
||||||
|
3. Tab toolbar includes options to name.
|
||||||
|
|
||||||
**Questions:**
|
**Questions:**
|
||||||
|
|
||||||
|
@ -46,23 +46,17 @@ A subflow node has the following properties:
|
||||||
* `type` : `subflow`
|
* `type` : `subflow`
|
||||||
* `id`
|
* `id`
|
||||||
* `name`
|
* `name`
|
||||||
|
* `in` - the id of the internal node that provides the flow's input port.
|
||||||
|
* `out` - an array identifying the internal nodes and their output ports that are mapped to the flows outputs. Elements are objects of the form: `{id:ID, port:PORT}`.
|
||||||
|
|
||||||
|
|
||||||
A node that is part of a subflow has their `z` property set to the `id` of the subflow.
|
A node that is part of a subflow has their `z` property set to the `id` of the subflow.
|
||||||
|
|
||||||
An instance of a subflow has the following properties:
|
An instance of a subflow has the following properties:
|
||||||
|
|
||||||
* `type` : `subflow` ... ?
|
* `type` : `subflow:ID`
|
||||||
* `id`
|
* `id`
|
||||||
* something to identify mode... if we have modes.
|
* `singleton` : true/false
|
||||||
|
* `name` - if singleton, inherits from parent subflow
|
||||||
It inherits the `name` of the parent subflow.
|
|
||||||
|
|
||||||
**Questions:**
|
|
||||||
|
|
||||||
* how does an instance node identify its parent?
|
|
||||||
* type=subflow:'parent-id'
|
|
||||||
* type=something other than subflow and parent=<parent-id>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue