ISSUE/QUESTION:
When working with Workflows you might encounter errors indicating SPIN/DOM-XML. These errors can be random but when occurred once can occur repeatedly.
The error is 'Cannot serialize object in variable 'var' : SPIN/DOM-XML-01030 Cannot create context'. It is visible in troubleshoot mode as below.
ENVIRONMENT: IFS Cloud
AUDIENCE: ALL
RESOLUTION/ANSWER:
When this error is encountered at the point of using an array in a script task, following workaround can be used.
Instead of an array use the java ArrayLIst implementation in the script task.
For example, the error seen in the image can be overcome by replacing the script with the following.
var c = new java.util.ArrayList();
c.add(‘x’);
execution.setVariable("abc",c);
CAUSE: N/A
ADDITIONAL INFORMATION: N/A
SCRIPTS/LOGS: N/A
SOURCE: CS0206101
VERIFIED: NO