In this tutorial, we will show how to run a DataFlow from the FlowEngine.
We will be using the node “Start Dataflow“ on the “Onesait Platform Dataflows““ category
Let's see how we can use that node. To do this, we will follow the following steps:
Select the "FlowEngine Management" option from the menu:
Select the domain belonging to your user:
Once you are in the domain, drag a node of type "Start Dataflow" to the flow and double click on it to see its 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 dataflow is the one that will be started. If msg.dataflowIdentification has content, this will be used insted of the base property.
Reset origin: If checked, it will reset the origin’s pointer. If msg.resetOrigin has content, this will be used insted of the base property.
Parameters: A list of properties sent to the dataflow. The value of each parameter can be a static value (string) or comming from a field of a msg (msg.)
If the incoming message has the property msg.parameters defined, its value will be used instead. The format of this field must be an JSON contaning key/value as follows:
msg.parameters = '{"query":"where field=”value”"}'
Run the dataflow
Whenever a message reaches the node, it will try to start the selected DataFlow. The result of the execcion (and its state) will be shown in the msg.payload: