mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Page:
Design: subflows
Pages
API Reference
Architecture Overview
Architecture: Cluster Multi Process
Contribution Process
Dashboard layout tool
Definitions
Deprecated: Message properties overriding set node properties
Design Notes
Design: dynamic palette
Design: API Token management
Design: CLI tool to produce a node skeleton
Design: Concurrent editing
Design: Custom Node admin route handling
Design: Dynamic MQTT node
Design: Dynamic node's icon
Design: Editable port labels
Design: Editor Events
Design: Editor Themes
Design: Editor UI Customisation
Design: Encryption of credentials
Design: Enhancements to Split Join nodes
Design: Flow Linter
Design: Flow Manipulation API
Design: Flow file format v2
Design: Function Library node
Design: Library Sidebar
Design: Logging Framework
Design: Node Generator
Design: Node Messaging API
Design: Node blacklist whitelist function
Design: Node module lifecycle
Design: Node settings
Design: Palette Management UI
Design: Persistable Context
Design: Platform Specific Nodes
Design: Projects
Design: Runnable Project
Design: Runtime Editor Split
Design: Runtime Events
Design: Runtime extension points
Design: Subflow Enhancements
Design: Subflow Instance properties
Design: Subflow Node modules
Design: Usage telemetry
Design: Using environment variables
Design: Version Control
Design: adminAuth User Management
Design: external file for function and templates nodes
Design: i18n de
Design: i18n
Design: msg.parts description of usage
Design: multiuser
Design: subflows vNext
Design: subflows
Design:Shared Global Context
Editor Mouse Actions
Editor Runtime API
Flow Format
Flow testing
Home
Input node feature definitions
Live runtime information
Node Design Guidelines
Node documentation guide
Node msg Conventions
Output node feature definitions
Pluggable Message Routing
Query node feature definitions
ReadMe Raspberry Pi Advanced
Runtime Editor Comms protocol
Technical Interchange 2018 04 13
Technical Interchange Meetings
Testing
UI testing
Watch node feature definitions
Web Nodes outline
adminAuth Credential Authentication
dynamic palette
join in auto mode
npm installable nodes
0
Design: subflows
Kazuki-Nakanishi edited this page 2017-03-10 12:52:02 +00:00
A subflow is a set of connected nodes that can be easily reused within a larger flow.
A subflow is represented as a single node in the workspace which can be opened up in a tab to see the underlying flow.
Creating a subflow
An empty subflow
- Selects 'Create subflow' option.
- Creates a new subflow with a default name, added to palette
- Opens the subflow tab
From existing nodes
- User selects some existing nodes.
- Selects 'Convert to subflow' option.
- Nodes are removed from workspace and replaced by a subflow node.
- Subflow node given a default name and added to palette
Questions:
- how to automatically identify the input/output ports to map to
- what restrictions should be applied?
- a single, continuous flow of nodes - aside from comment nodes
- only one 'left most' node
- what about subflows with no left most node? Would there be any way to override properties of a contained node? For example, consider a subflow containing an mqtt sub and deserialiser pair where modifying the topic of the mqtt subscriber would be useful.
Editing a subflow
- Double click subflow node.
- Opens the edit-node dialog for the instance of the subflow
- Click the 'edit subflow' option in the dialog opens a closeable tab containing the flow.
- Tab toolbar includes but to open subflow edit dialog (also accessed by dblclicking on tab, or any input/output node in the flow)
Delete subflow
- Open subflow edit dialog
- Click delete
Difference between subflow and link node.
There are some differences between subflow and link node.
There are two cases about link node. A link out node wired to link in node in a same tab and a different tab.
Condition | Subflow | Link node (same tab) | Link node (different tab) |
---|---|---|---|
Share context.flow | NO | YES | NO |
Share context.global | YES | YES | YES |
Catch error in caller tab | YES | YES | NO |
Node actions (e.g. inject node) | NO | YES | YES |
Definition
A subflow node has the following properties:
type
:subflow
id
name
in
- an array identifying the internal nodes that are mapped to the flow inputs. It will have zero or one elements.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.
An instance of a subflow has the following properties:
type
:subflow:ID
id
name