When reading XML data into a process variable in LiveCycle ES you may receive the following exception:
Target exception: ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error. at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:74) at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:69) at bsh.Interpreter.eval(Interpreter.java:594) at bsh.Interpreter.eval(Interpreter.java:682) at bsh.Interpreter.eval(Interpreter.java:672) at com.adobe.workflow.qpac.script.ScriptService.execute(ScriptService.java:88)
This particular exception occurred using the Script QPAC to read in the XML data using script as follows:
String clean_xml = patExecContext.getProcessDataStringValue("/process_data/myxmlbranch");
clean_xml = clean_xml.replaceAll("(<)","<");
clean_xml = clean_xml.replaceAll("(>)",">");
This script works fine in LiveCycle 7, but after upgrading to LiveCycle ES, the script throws the error.
There are some unexpected characters in the XML data stream.
In this case there were quotation marks at the start and end of the XML stream. Such characters were stripped away automatically in LiveCycle 7, but LiveCycle ES is more strict with the format of the incoming XML. You must remove the unexpected characters manually and then it will process the XML without problems.
If a LiveCycle 7.x process, that is upgraded to LiveCycle ES, includes the Script QPAC, the Script QPAC may contain script that was developed using the LiveCycle 7.x API. To ensure compatibility with LiveCycle ES, the script may need to be rewritten based on the LiveCycle ES API.
In this case the getProcessDataStringValue() and setProcessDataValue() methods of the patExecContext embedded object are available in ES just as they were in LiveCycle 7 so there were no changes necessary in the script.