FormalExpressions CDATA

Don’t need to talk about the deploy itself, since it works perfectly in other situations.

Activiti throws an exception if the bpmn contains expressions with an “&” (that is sent as &):

2018-12-12 09:45:10,647 ERROR BpmnXMLConverter     [qtp1824379333-91    ] Error processing BPMN document
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[30,78]
Message: The entity name must immediately follow the '&' in the entity reference.
        at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:604)
        at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.getElementText(XMLStreamReaderImpl.java:865)
        at org.activiti.bpmn.converter.child.ConditionExpressionParser.parseChildElement(ConditionExpressionParser.java:34)
        at org.activiti.bpmn.converter.util.BpmnXMLUtil.parseChildElements(BpmnXMLUtil.java:126)
        at org.activiti.bpmn.converter.BaseBpmnXMLConverter.parseChildElements(BaseBpmnXMLConverter.java:249)
        at org.activiti.bpmn.converter.BaseBpmnXMLConverter.parseChildElements(BaseBpmnXMLConverter.java:240)
        at org.activiti.bpmn.converter.SequenceFlowXMLConverter.convertXMLToElement(SequenceFlowXMLConverter.java:47)
        at org.activiti.bpmn.converter.BaseBpmnXMLConverter.convertToBpmnModel(BaseBpmnXMLConverter.java:84)
        at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:430)
 <bpmn2:sequenceFlow id="SequenceFlow_0n3qmsm" sourceRef="ExclusiveGateway_1pxlfg4" targetRef="Task_1nf8qhh">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">${a &gt; 2 &amp;&amp; a &lt; 3}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>

If it doesn’t contain an & or if the & is inside a CDATA it wont throw an exception, parsing the bpmn deployed as it should.