BPMN Converter: Adding a listener to a script task produces erroneous XML content.

Description

Adding a listener to a script task in the Activiti Designer 5.11.1 produces erroneous XML content.

The <extensionElements> section containing the execution listener is written at the wrong position:


This leads to the following exception:
org.activiti.engine.ActivitiException: cvc-complex-type.2.4.d:Invalid content was found starting with element 'extensionElements'. No child element is expected at this point.

The correct order is

  1. extensionElements including listeners

  2. script content

This error might effect other elements as well - the implementation in org.activiti.bpmn.converter.BaseBpmnXMLConverter first writes additional child elements and listeners afterwards (with the exception of the sequence flow which has a condition expression that should come after the extensElements as well).

Environment

Eclipse Indigo SR2
Activiti Designer 5.11.1

Assignee

Tijs Rademakers

Reporter

Gunnar von der Beck

Labels

None

Components

Fix versions

Affects versions

Priority

Critical
Configure