How to check DataFlow status from FlowEngine
In this tutorial, we will show how to check the status of a DataFlow from the FlowEngine.
We will be using the node “Check Dataflow Status“ on the “Onesait Platform Dataflows““ category
Let's see how you can use that node. To do this, follow the following steps:
Select the "FlowEngine Management" option from the menu:
Â
Select the domain you want to work on:
Â
Once you are in the domain, drag a node of type "Check Dataflow Status" to the flow and double click on it to see its configuration properties.
The following are the base properties:Name: The name that you want the node to have when viewing it within the flow.
Dataflows available: List of dataflows availables by the user
Dataflow: Dataflow selected in the previous box. This is the dataflow whose status will be checked. If msg.dataflowIdentification exists in the incoming message and it has content, its value will be used insted of the base property.
Wait until Status: It allows you to configure whether you want a status check to run when receiving messages, or a scheduled check by polling. The available options are:
none: Default behavior of the node. It will check the status of the selected DataFlow when a message is received.
interval: It will check the status automatically every x time since the node changes are deployed.
Â
interval between times: It will launch the status checks in a planned manner as if it were a crontab.
Â
at specific time: It schedules the status check for a specific time.
If an option other than "none2 is chosen, two new properties will appear.Status: It indicates the status you are expecting when checking. If the DataFlow status matches the one marked in this field, an output message will be generated.
Restart checking status after receiving a message:Â If marked as active, the health check will be performed every time an incoming message is received from the node. Otherwise, planning will be carried out after performing a "deploy".
Stop after first match:Â If enabled, it will stop the scheduled health check run when the first match occurs. You will be able to tell whether the desired state has been found or not by looking at the state of the node in the flow as follows:
Waiting for indicated status/active planning:
Â
Status matching the indicated/scheduling disabled:
Â
Run the dataflow:
Every time a message arrives at the node, it will attempt to check the selected DataFlow’s status. The result of the operation, as well as its status, will be returned in the msg.payload:
Â