Scripting in Camunda


Is normal java script supported in camunda scripting? (as inline script/for script task),

i see that console.log is not supported and gives error.

Sindhu .

Take a look at:

And note that the Js engine is Nashorn. So you use the features of the nashorn engine.

So you don’t use console.log rather you use the java console printing command as per:

1 Like

Hi, Thanks for the reply. Is nashorn the default engine for javascript? Sorry am not much aware of engines used.

@sindhu_veladi Latest Java version will have Nashorn java script engine as default, older versions like Java6/7 will have Rhino java script engine as default. Still you can refer to different javascript engines available in JRE by below snippet,

ScriptEngine engine = new ScriptEngineManager().getEngineByName( "nashorn" );