Diagram import or export removes camunda namespace

Hi,

I have a bpmn 2.0 xml which has xmlns:camunda=“http://camunda.org/schema/1.0/bpmn” namespace definition.
I add a camunda:delegateExpression attribute to a service task:

      element.businessObject.$attrs['camunda:delegateExpression'] = '${serviceTaskHandler}';

When I call saveXml method it gives me the warning “missing namespace information for camunda:delegateExpression = ${serviceTaskHandler}” and exports the xml without the “xmlns:camunda” namespace.

Thank you.

In general Missing namespace information is the hint that you did not provide the camunda namespace information to the model:

xmlns:camunda=“http://camunda.org/schema/1.0/bpmn”

Refer to this test case to learn how to manually supply it.

You mentioned the diagram already contains the information. If that is the case, we may look at a bug. Please open a ticket in bpmn-moddle, including a minimal test case and we may be able to have a look.