An open API service indexing awesome lists of open source software.

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

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

![aims at providing](scripted-transformation/scriptedTransformer.png)

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 context

It 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 file

Use it in your Integrations :)