Hi,
Currently I am using rhino script engine as I had to use SecureScriptExecutor for whitelisting java classes(to be used in script task).
So all javascripts written in script tasks are executed by rhino engine, rather than JDK default nashorn.
I am facing challenge when I try to access a field of a json type variable(variable was of type jackson JsonNode set in previous service task in deleteExecution) in a script task using dot operator it is not working.
say jsonField = {“a”:10, “isTrue”:false};//Set in service task
Now below script in script task now working
var a = execution.getVariable(jsonField);
var b = a.b;//Not working
If I change the code below it is working
var a = execution.getVariable(jsonField);
a = JSON.parse(a.toString());
var b = a.b;//working now.
Also I have extented org.flowable.variable.service.impl.types.JsonType to store it as custom type.
Any help will be greatly appreciated.