AnsweredAssumed Answered

Adding extension attributes on boundaryEvents

Question asked by lmollea on Dec 16, 2014

we need to add some extra attributes on a BPMN we are generating from a config file. We tried to add some ExtensionAttributes (we're using the org.activiti.bpmn.model package API) on some boundaryEvents (timer events we placed on some userTasks), but when producing the XML with org.activiti.bpmn.converter.BpmnXMLConverter such attributes are not serialized in the XML.

Is that a bug or a feature (joking of course, I mean, is that on purpose?)

This would be the code for adding the attributes:

      String id = "boundaryevent" + idx.incrementAndGet();
      BoundaryEvent be = new BoundaryEvent();
      be.setAttachedToRef((Activity) process.getFlowElement(attached));
      TimerEventDefinition event = new TimerEventDefinition();

      ExtensionAttribute attr = new ExtensionAttribute("reference");


But the resulting XML shows no sign of the "reference" attribute added.

    <boundaryEvent id="boundaryevent15" name="Timer" attachedToRef="usertask13" cancelActivity="false">
        <timeDate>${checkpointHelper.mktime(processDateTime, -45)}</timeDate>

AFAIK, the BpmnXMLUtil.writeCustomAttributes is used only by UserTasks