Hi,
For a part of my research project, I was trying to replace all inclusive gateways into parallel gateways and update corresponding arcs and references from a .bpmn model using BPMN model API.
During the implementation, however, I encountered a problem that when a new element is created, the name of the element can or can not get a prefix (e.g., the “bpmn:” prefix). For example:
<outgoing xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL">StartEvent_1-translated_P_1</outgoing>
instead of:
<bpmn:outgoing>StartEvent_1-translated_P_1</bpmn:outgoing>
But it gets this prefix only if the namespaceURI of the new element and of the root element (the bpmn:definition element) are DIFFERENT. This is in method determinePrefixAndNamespaceUri() in class org.camunda.bpm
Please kindly advice that how can I get the correct namespace for newly created elements in the model. Below I attach two models that before the implementation and after the implementation (which is incorrect in namespace) respectively, together with my java code of the implementation.
afterChanging.bpmn (12.1 KB)
beforeChanging.bpmn (9.9 KB)
ORGatewayConventor.txt (5.1 KB)
Thanks,
Xiaoqing Hu