This alone won’t save the
camunda:candiateUsers entry to XML. The reason is, that you need to declare the
camunda namespace, too:
This is required to produce a valid BPMN 2.0 XML document.
The better alternative is to make bpmn-js aware of the
camunda namespace and its attributes by including camunda-bpmn-moddle.
This way you can simply do the following:
this.element.businessObject.candiateUsers = 'a, b, c';