Creating a Source-Type Integration
The Source screen is where you create your Source-type integration flows. You can create integrations in two ways:
-
Visually, in the Diagram tab: add steps to the canvas and fill out the configuration forms to define the integration flow.
-
Using code, in the Source Code tab: use CAMEL YAML DSL to write the integration script directly in the
main.yaml
file.
While building the integration in the Diagram tab, you can switch to the Source Code tab to view the corresponding code, and vice versa.
The animation below illustrates how to create a flow and the features available in each tab:
Check our step-by-step guide to building an integration:
Create a new flow in the Integration Flows screen
-
Access the Integration Flows screen.
-
Click + NEW FLOW.
-
In the modal window that opens, enter the name and version of the integration flow. You can edit them later.
-
Select the Source design type.
-
Click SAVE.
Access the Source screen
-
After creating the flow, you will see the Source screen with the Diagram tab selected by default.
-
In
main.yaml
, you will see the canvas with the empty trigger step as the first step of the integration.
The image below shows the Source screen displaying the Diagram tab.
Select a trigger to execute the integration
-
Click + Add Trigger.
-
Select a trigger from the menu on the right side of the screen and click CONFIRM to add it to the canvas. Alternatively, you can drag and drop it. If necessary, use the search tool to locate it.
-
After adding the trigger to the integration, the configuration form will automatically open. However, you can continue adding steps and configure it later.
You can replace a trigger with another, but all configurations of the original trigger will be lost. To replace a trigger, click the three-dot icon on the step and then click Replace. |
Add components and EIPs to the route
-
After adding the trigger, you will see an icon
, indicating the addition of a new step.
-
Click the icon
. Then click + Add Step.
-
Select a component or an EIP from the menu on the right side of the screen by clicking the corresponding tab. If necessary, use the search tool to locate a specific component or EIP. Then, click CONFIRM. Alternatively, you can drag and drop it.
After adding a step to the canvas, the configuration form will automatically open. However, you can continue adding steps and configure them later. |
To enable the sending and viewing of execution logs in Sensedia Analytics, add the Log EIP. When viewing the logs, you will not be able to select the Trace and Debug levels. |
(Optional) Create resource files
For some Apache Camel components, such as “JSONata”, you need to use scripts stored in separate files. These files can be created in Resources, regardless of the file extension. This way, you can reference them directly in the main flow, ensuring they are used during the integration flow execution.
To create a resource file:
-
Click the resources icon
in the left corner of the canvas.
-
Click +.
-
Click the file and set the name and extension, for example:
jsonata.yaml
,test.txt
, etc. -
Add the file content in the text editor.
-
Save the resource file by clicking SAVE.
Check out more information about Resources. |
(Optional) Create flow variables
Variables allow you to customize the flow configuration and parameterize environments, eliminating the need to create a separate integration flow for each environment.
To create a variable:
-
Click the variables icon
in the left corner of the canvas.
-
Select the environment where the variable will be applied: Production or Staging.
-
Register the variable in the form that opens.
-
Save the variable by clicking SAVE.
Check out more information about variables. |
Save the project
When you finish configuring the flow, save the integration by clicking SAVE in the top-right corner.
Share your suggestions with us!
Click here and then [+ Submit idea]