add wrapper for processor functions
//
// kamel run examples/routes.js
//
+const org_apache_camel_Processor = Java.type("org.apache.camel.Processor");
+const Processor = Java.extend(org_apache_camel_Processor);
l = components.get('log');
l.setExchangeFormatter(e => {
@@ -29,7 +31,7 @@ from('timer:js?period=1s')
.routeId('js')
.setBody()
.simple('Hello Camel K')
- .process(e => {
+ .process(new Processor(e => {
e.getIn().setHeader('RandomValue', Math.floor((Math.random() * 100) + 1))
- })
+ }))
.to('log:info');
\ No newline at end of file
