A sample for dirigible integrations module. This sample shows the following 3 topics:
- How to use the Designer to create/modify routes.
- How to invoke Dirigible
*.mjsfiles via Camel routes, - How to invoke Camel routes from Dirigible
*.mjsfiles via thesdk/integrationsAPI - How to use the built in
Camel FTPcomponent to save data as a file in an FTP Server.
- To run this project you need to add the following dependencies:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-ftp</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-direct-starter</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-direct</artifactId>
<version>${camel.version}</version>
</dependency>
to components/engine/engine-camel/pom.xml then build/run Eclipse Dirigible.
- Import the
/camelfolder of this repository as a zip in Eclipse Dirigible via the import feature in the UI. - As one of the routes uses the
FTP Componentyou can run a local FTP server withFileZilla Server
routes.camel contains the routes definitions for the following two routes:
route-3c7athis route can be called with a POST request to http://localhost:8080/services/integrations/endpoint and it will callhandler.jswith the HTTP request payload and then save the final processing result to a localhost:21 FTP server with user test and no password.route-bda8a direct route that is called byrouteInvoker.mjsthat modifies the message provided byrouteInvoker.mjsand returns it as a response.
Rest services are not included in this sample, but they can be created in the REST tab of the camel editor and they call direct routes defined in the Routes tab.

