Creating a Basic Flow
In this tutorial, we create a basic flow that simply prints Hello World to the debug tab. It only uses two nodes: the inject node and the debug node. The inject node allows us to manually supply a message to the flow, while the debug node simply writes any messages it receives to the debug tab of the information panel to the right of the screen.
See Creating Flows Templates for details on how to create a flow from a saved template.
The inject and debug nodes are typically used for development and debugging purposes only, rather than in a flow that you might deploy to Production. |
Creating a Basic Two-Node Flow
1. | Sign in to Verizon Connect® Flows™ to open the Developer Console. |
2. | Click the Create flow button in the upper right corner of the screen. The Create Flow dialog box opens. |
3. | Select the Default button in the Revision Control section. |
4. | In the Flow name field, enter MyFlow. |
5. | Select the Standard Flow radio button. |
6. | Click Create. The new flow is displayed at the top of the Developer Console. |
7. | Click the flow name (MyFlow) to open it in the Flow Editor. |
8. | From the utility section of the nodes listed in the left palette, click and drag the inject node onto the central sheet. |
9. | Again from the utility section, click and drag the debug node onto the central sheet to the right of the debug node. The sheet now contains two nodes. Next, we wire the two nodes together, so that the output from the inject node is fed into the input of the debug node. |
10. | Click and hold the grey square on the right side of the inject node and drag your mouse to the grey square on the left side of the debug node. A line is drawn between the two nodes that connects the inject node's output to the debug node's input. |
11. | Double-click the inject node. |
12. | From the Edit inject node dialog box, open the Payload drop-down list and select "string". |
13. | In the Payload field, enter Hello World, then click Done. The basic flow is now complete and can be deployed. |
14. | Click the Deploy button in the upper right corner of the screen. |
15. | From the right information panel, click the debug tab. |
16. | From the central sheet, click the light blue circular button to the left of the inject node. Clicking this button manually runs the flow. As flows execute, progress messages are shown below each node on the sheet, including any relevant error messages indicating the node at which the error occurred. Because this flow includes only two nodes, executing it should complete immediately and no messages are likely to be shown. The debug tab should now display the string text Hello World. You have completed your first basic flow. Next, we communicate with TDE using the REST API via the tde rest node. See Talking to TDE via the REST API for details. |
The flow created in this tutorial is described by the JSON below.
To import a flow into the Editor, copy the code provided, click the upper right ≡ Menu button, then select "Import" > "Clipboard". Paste the code in the Import nodes window, then click Import.
Code:
[
{
"id": "c5d202ce.63c14",
"type": "inject",
"z": "d3c71a0.08302e8",
"name": "",
"topic": "",
"payload": "Hello world",
"payloadType": "str",
"crontab": "",
"once": false,
"x": 240,
"y": 260,
"wires": [
[
"8b7a3962.200eb8"
]
]
},
{
"id": "8b7a3962.200eb8",
"type": "debug",
"z": "d3c71a0.08302e8",
"name": "",
"active": true,
"console": "false",
"complete": "false",
"x": 550,
"y": 260,
"wires": []
}
]