Handling an IllegalDataException for invalid XML during serialization
When you convert a string that contains ASCII control characters to XML, you receive an IllegalDataException during serialization. You can add a configurable property in the 100Custom.xml file to automatically make strings XML-compliant.
About this task
When you enter XML characters into a form, coach, or a JavaScript API, the tw.system.serializer.toXml JavaScript API takes the input as a TWObject, parses it, and converts it into XML. If the TWObject contains a string with invalid XML characters, such as control characters 0x01 or 0x02, it raises an IllegalDataException. To have IBM® Business Process Manager automatically correct the XML code, you can add a configuration flag <autocorrect-xml> in the 100Custom.xml file that automatically removes invalid characters in a string input and makes it XML-compliant.