Skip to main content

Flow Guide

A flow is composed of three main elements: a trigger, a mashup, and targets. There is a single mandatory trigger. It's possible to omit the target, or specify multiple targets to route the output to various destinations.

Start creating a Flow by clicking on the Create Flow button.

image-20230612163527646

Choose a name and a Mashup for your flow.

image-20230612163527646

Trigger

The trigger is defined as the signal that initiates the execution of the mashup. There are several types of triggers available:

  • HTTP: This trigger allows users to invoke the mashup through a simple POST type HTTP request. The endpoint for accessing the mashup can be found at the bottom of the modal.

image-20230612163527646

  • Kafka: This trigger enables the mashup to be started by sending a message to a selected topic in Kafka. It requires configuration with the bootstrap host, port parameters, Kafka group, and topic.

image-20230612163527646

  • MQTT: This trigger allows the mashup to be started by sending a message to a selected topic in MQTT. It requires configuration with the host, port, and topic.

image-20230612163527646

  • Scheduled: This trigger utilizes a time-scheduler to start the mashup at specified intervals.

image-20230612163527646

Data Bind

When using HTTP, Kafka, or MQTT as triggers for the mashup, configuring the data bind is essential. The data bind configuration enables the input of the mashup to be connected with the complete data or a part of it sent through the trigger. For example, if you send a Kafka message to the topic that triggers the mashup and you need to use its data as input, you must declare the corresponding pair input JSON path in the modal. The trash bin icon on the right side of the modal allows you to delete created pairs. Note that any unbound pairs will not be saved in the trigger.

JSON path example:

{
"name": "John",
"age": 30
}

Then the JSON path for the name field will be name and the JSON path for the age field will be age.

If you're sending a JSON via a trigger that exactly matches the defined input, select the input and leave the JSON path field empty to use the entire JSON. This is only possible when there is a single input node. Make sure that you're sending the input in the same way defined in the input modal in the field type(Query,Header,Body).

image-20230612163ee46

Authorization

The access policy determines who can execute the project through DME (Data Mashup Engine). There are three options:

  • PUBLIC: Everyone can execute the project.

image-20230612163527646

  • API-KEY:

When the access policy is set to API-KEY, an API-Key field is displayed. It can be regenerated or copied to the clipboard. This API-Key is required for executing the project when the access policy is set to API-KEY. Only those who have the API-Key can execute the project through DME.

image-20230612163527646

  • OAUTH2:

When the access policy is set to OAUTH2, the user must provide the OpenID Discovery URL: this URL is used to retrieve the OAuth2 configuration. The OAuth2 configuration is used to retrieve the access token. The access token is used to execute the project through DME.

image-20230612163527646

Mashup

This is the field where you can select which version of the mashup you want to execute in your flow. It's important to know that only released mashups can be used within a flow. Additionally, you can change the version of the instantiated flow.

Targets

Targets are the entities where the output of our mashup will be sent. There are different types of targets available:

  • HTTP: This target can be configured with a name, endpoint, HTTP method, and header parameters. Available HTTP methods are POST, PUT, and PATCH.

  • Kafka: This target can be configured with a name, bootstrap server information (HOST and PORT), and topic.

  • MQTT: This target can be configured with a name, HOST, PORT, Fiware service, and Fiware service path.

  • ORION: Specify the Orion target configuration.

  • Fhir: This target can be configured with a name and a Fhir server base URL.

  • Rule Manager: This target can be configured with a name and permits to send the output of the flow to the rule manager.

image-20230612163527646

Execution rules

  • Always: The mashup will be always executed.

Authorization

Currently, the mashup editor supports two types of authentication: Basic and OAuth 2.0.

  • Basic Auth: It can be configured with just a username and password.

  • OAuth 2.0: It requires an Access Token URL, Client ID, and Client Secret configuration.

Please refer to the documentation for a detailed guide on setting up and configuring the filter elements in your flow.

How to start a Flow

After configuring the trigger, selecting the appropriate mashup version, and setting one or more targets, you can start the flow by clicking the button in the top-left corner (indicated by the arrow). You can stop the flow by clicking the button again. The flow status is displayed right next to it.

image-20230612163527646

Flow Status Definitions

  • Not Running: The flow is deactivated.

  • Pending: This status appears immediately after clicking the button to deploy the flow.

  • Deployed: The flow is in the final phase of deployment.

  • Running: The flow is active, functioning correctly, and accessible.

  • Terminating: The flow is being deactivated.

  • Unknown: An error has occurred in the flow.