Cyclic flows¶
This feature can execute the cyclic flows for each tab individually in Visual Flow Creator. The "Allow cyclic flows" can be enabled or disabled by using the toggle button at the edit flow tab properties.
Example¶
To execute the cyclic flows using delay node, follow these steps:
-
From the node palette, drag and drop the nodes with the respective palette to the working area. Connect the nodes in a flow as shown below:
-
Double click on "inject" node to edit the properties. For more information, refer to Editing nodes.
-
Double click on "function" node to edit the properties.
- Enter the "Name" as "Increment".
- Select the "Language" as "javascript".
-
Enter the "Code" as:
msg.payload++; return msg;
-
Click "Done".
- Enter the "Name" as "Increment".
-
Double click on "delay" node to edit the properties.
- Select the "Action" as "Delay each message".
- Select the "Fixed delay".
- Enter the "For" as "2 seconds".
Note
If you proceed to save and deploy the flow, a notification will be displayed with the message "Deploy failed: cycles are detected. This can lead to high compute hours consumption!"
- Select the "Action" as "Delay each message".
-
Edit the flow tab properties.
Note
Allow cyclic flows should be enabled.
-
Save and execute the flow.
The output will be displayed in the debug tab.