Skip to main content

Flows

Flows define how data is routed between endpoints in order to automate your operations.

The Basic Integration section explains an integration is generally composed of three flows: Import Flow, Converter Flow and Export Flow.

An Import Flow gets data from an API A and stores it in Cenit in a data type adecuated for this object in A, by using a Parser Translator.

A Converter Flow converts the data stored in Cenit from A, to a datatype adecuated for an API B, storing the new data also in Cenit. This mapping process is conducted by a Converter Translator.

And finally, the Export Flow sends data stored in Cenit to an external API, by using a Template Translator.

The flows should be triggered by events that could be of type Data Events, related to changes in data, or Schedulers, which could be programmed to execute at intervals.

You can perform operations on flows using the Cenit IO API V2. To do this, see the specification of this API in section flows.

Add New Flow​

The submenu Flows allow to create a new flow by clicking the New button (+) in the Generic Menu.

New flow

Every flow in Cenit is created by using the same new action under the submenu Flows regardless its kind.

The kind of flow we're creating depends on the translator assigned, in a view like the one shown in the picture below. So, if we are intended to execute an Import Flow, we need to use or create a Parser Translator. If we want to execute a Converter Flow, then we must create or use a Converter Translator and when we are intending to execute an Export Flow, we must use or create a Template Translator.

Selecting a translator

All translators are Ruby code. You can learn about translators in Transformations section. Translators can be developed before in Snippets section.

The input fields may vary depending on the translator, and consequently, the kind of flow to be created. For example, both an import and an export flow need a connection and a resource path to send the request. However, a converter flow doesn't need a connection since this process is executed internally inside Cenit. Export flows need a connection of course, to connect with a destination API.

After completing the flow declaration and pressing the save button, you can see the new flow on the list of flows and you can manage it as well as you can do with other elements in Cenit.

The figure bellow shows a new added flow to the list of flows in a tenant.

New flow added​

Processing a flow​

From the list of flows, you can select a flow and run (or process) this by pressing the Process button:

Process a flow

A run symbol appears on the screen. Press it and wait to end the process.

The figure bellow shows a flow in pending status.

Processing a flow

Status of flows can observed in System Notifications as well.

You can test some flow is picking a record of the datatype you want to process (go to Data/Object types and list the records of this datatype), and select the button "send to flow".

Send to flow

Then, you select the flow you're intended to test and press the same the button that is located in the bar above or in the lower right corner:

Send a record to a flow

If everything goes well you can see a screen like the below one when completed.

Process completed

Another way to see the status of a flow is searching notifications in System Notifications:

Flows executed

And you can check if the record of the data type was successfully stored or send going to the menu Data.