Process Engine and JSR223 Scripting Languages

Dear all, I am trying to integrate non-Java ERP application with Camunda Process Engine.
Nice way to write some “application-native” code in BPM Process definition is JSR223 language implementation.
My implementation sees all input variables nicely with
... extends AbstractScriptEngine { @Override public Object eval(Reader script, ScriptContext context) throws ScriptException { Bindings bindings = context.getBindings(ScriptContext.ENGINE_SCOPE); ...

But how Process Engine does expect to get output variables?

Hi @kuz,

in your script, you have to set the output process variables explicit via
execution.serVariable('name', value).

There is no auto-storing of script variables. Please see the notes in the Reference Guide.

Best regards,

Fast and accurate answer, thanks! autoStoreScriptVariables could do what I want, but explicit way of setting variables in your example is more predictable.