The following script task fails:
<javascript>
var structure = {
fred: 123,
bill: ['x', 'y', 'z'],
eric: { smoo: 'froob'}
};
execution.setVariable("STUFF",structure);
</javascript>
It fails because findVariableType() in DefaultVariableTypes.java cannot locate an appropriate type for storage.
The returned value is a sun.org.mozilla.javascript.internal.NativeObject which seems to be opaque. The original Rhino type was org.mozilla.javascript.NativeObject which is Serializable and would therefore be handled automatically as a SerializableType in the Activiti engine.
Is there a simple way to allow this to work? It seems like a fairly fundamental requirement so I assume someone must have investigated this.
Thanks,
Andy