-
Notifications
You must be signed in to change notification settings - Fork 157
Flow Dev Guideline
LEEHYUKJOO edited this page Dec 13, 2018
·
51 revisions
This page is for discussing about how to make Flow Dev Guideline.
You can check the original contents at HERE.
・Overview and purpose of this chapter ・Brief description of Node-RED objects ・Necessity of making flow on the premise that other users will reuse ・Proper design with understanding the structure of the flow
・Do not make multiple nodes use same property ・Importance of dividing data processed by node(msg.payload property) and controlling feature of node(msg.). ・How to prevent
・Recommended pattern of parameter setting
In a node to which multiple messages with different types are input, add tag information for identification to each message.
・Necessity of tag due to the fact that there is only one input port of node
・Points to note when handling large amounts of data
・The order of arrival of messages when processing multiple messages
// Accumulation of messages
var msgs = context.get('messages') || [];
msgs.push(msg);
if(msgs.length === ...) {
... // Process messages
}
context.set('messages', msgs);