Set custom attribute for userTask in xml tag


I need to add due date attribute from Activiti in a user task element, like as:

<userTask id="theTask" name="Important task" activiti:dueDate="${dateVariable}"/>

I’m setting the custom attribute ‘activiti:dueDate’ to user task element this way:

var modeling = self.editorViewControl.bpmnEditor.get('modeling'); modeling.updateProperties(self.editorViewControl.selectedElement, { 'activiti:dueDate': 'PT5M' });

but, doesn’t work, the attribute is not exported.

How to do this?

Guilherme Santos


Doesn’t work with attribute ‘activiti:dueDate’, but when i change the attribute for ‘activitiDueDate’ works. Is there any way to work with the character ‘:’ in attribute name?

Make sure you set the custom activiti namespace on the BPMN 2.0 documents root element. See this bpmn-moddle test case for how to do it.