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:

  1. Select the "FlowEngine Management" option from the menu:

     

  2. Select the domain you want to work on:

     

  3. 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:

    1. Name: The name that you want the node to have when viewing it within the flow.

    2. Dataflows available: List of dataflows availables by the user

    3. 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.

    4. 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:

      1. none: Default behavior of the node. It will check the status of the selected DataFlow when a message is received.

      2. interval: It will check the status automatically every x time since the node changes are deployed.

         

      3. interval between times: It will launch the status checks in a planned manner as if it were a crontab.

         

      4. 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.

      5. 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.

      6. 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".

      7. 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:

        1. Waiting for indicated status/active planning:

           

        2. Status matching the indicated/scheduling disabled:

           



  4. 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:

Â