Skip to content
Permalink
Browse files
Update javascript.adoc (#759)
Processor declaration is not required anymore
  • Loading branch information
hguerrero authored and davsclaus committed Dec 14, 2021
1 parent 059870c commit 59f5d52dfdc915f81ba5306ddc08a8eeb8c48c61
Showing 1 changed file with 1 addition and 3 deletions.
@@ -10,14 +10,12 @@ An integration written in JavaScript looks very similar to a Java one:
[source,js]
.hello.js
----
const Processor = Java.extend(Java.type("org.apache.camel.Processor"));
function proc(e) {
e.getIn().setBody('Hello Camel K!')
}
from('timer:tick')
.process(new Processor(proc))
.process(proc)
.to('log:info')
----

0 comments on commit 59f5d52

Please sign in to comment.