https://github.com/alainpham/syndesis-advanced-extensions
Extensions that can be imported into Red hat Fuse Online / Syndesis to perform more advanced tasks
https://github.com/alainpham/syndesis-advanced-extensions
Last synced: 2 months ago
JSON representation
Extensions that can be imported into Red hat Fuse Online / Syndesis to perform more advanced tasks
- Host: GitHub
- URL: https://github.com/alainpham/syndesis-advanced-extensions
- Owner: alainpham
- Created: 2021-12-21T19:32:57.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-21T22:11:32.000Z (over 3 years ago)
- Last Synced: 2025-01-27T07:42:24.235Z (4 months ago)
- Size: 76.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# Advanced extensions for Syndesis (Red Hat Fuse Online)
Here are a list of extensions that can be imported into Red hat Fuse Online / Syndesis to perform more advanced tasks.
## Scripted transformations

This extensions provides a steps to perform transformations on the message headers and body using the javascript engine included in the JDK.
Javascript is conventient to use because it's easily testable outside of the tool.
Currently in order to access data fields, the input data needs to be in JSON String.
Click the 'Treat body as JSON' so that the component parses the body and renders it after the script is executed.
Predefined variables are :
* request.body : the message body
* request.body['key'] : access a field of the body
* request.headers['key'] : access to a header value
* exchange : access to the whole exchange object
* camelContext : access to the camel contextIt also provides utility steps to transform payloads in a generic way
* parsejson : Parses JSON String to Java Object
* renderjson : Renders a Java Object to JSON String
* tostring : forces camel to transform streams and others to String## How to install
Build the project
```
cd scripted-transformation/
mvn clean package
```Upload to extensions in Fuse Online
* Go to Customizations -> Extensions
* Click on Import Extension
* Upload Jar fileUse it in your Integrations :)