Scripting in Camunda

Hi,

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.

Thanks,
Sindhu .

Take a look at: https://docs.camunda.org/manual/7.10/user-guide/process-engine/scripting/

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: https://docs.camunda.org/manual/7.10/user-guide/process-engine/scripting/#printing-to-console-using-scripts

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" );