Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » namespace prefixes
namespace prefixes [message #1008053] Fri, 08 February 2013 16:23 Go to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member

I'd like to know why when I add an attribute "agoratestproperty" on JBPM5.5.5 project it generates an XML like this:
 <process id="com.sample.bpmn" tns:version="1" tns:packageName="defaultPackage" tns:adHoc="false" tns:agoratestproperty="Mingua" name="New Processasdasdda" isExecutable="true" processType="Private">
    <startEvent id="StartEvent_1" name="StartProcess"/>
    <task id="Task_1" name="Task 1"/>
    <userTask id="UserTask_1" name="User Task 1"/>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1" name="New Processasdasdda">
    <bpmndi:BPMNPlane id="BPMNPlane_Process_1" bpmnElement="com.sample.bpmn">

and when I do the samething in runtime.test, example or myown plugin, it generates something like:
 <bpmn2:process id="process_11111111" mym:agoraTEST="0" name="Default Process">
    <bpmn2:startEvent id="StartEvent_1">
    <bpmn2:sequenceFlow id="SequenceFlow_1" sourceRef="StartEvent_1" targetRef="EndEvent_1"/>
    <bpmn2:endEvent id="EndEvent_1">
  <bpmndi:BPMNDiagram id="_X7KDsHH_EeKutMD7P1p4vw" name="Default Process Diagram">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="mym:process_11111111">

The outpu differ on references: In BPMNDI.bpmnElement it puts the prefix (2nd case :"mym") and in JBPMN extensions it doesn't put the prefix. Someone can tell me we, Is it about metamodel? A searched on classes but I can't figure it out, I really need to purge those prefixes from my extension.

Re: namespace prefixes [message #1008331 is a reply to message #1008053] Mon, 11 February 2013 23:05 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Rui,

I'm not sure why this would cause you problems, but you could create a default XML namespace in the <definitions> root element, like this:


If you absolutely must, you can override the createDocumentRoot() method in Bpmn2ModelerFactory like this:

    public DocumentRoot createDocumentRoot() {
        DocumentRootImpl documentRoot = new Bpmn2ModelerDocumentRootImpl() {

	    public Map<String, String> getXMLNSPrefixMap() {
	        if (xMLNSPrefixMap == null) {
	            xMLNSPrefixMap = super.getXMLNSPrefixMap();
	  "", Bpmn2Package.eNS_URI);
        return documentRoot;

However, this means that your extension model's DocumentRoot MUST extend the BPMN2 metamodel DocumentRoot class, and your extension model resource factory MUST extend Bpmn2ModelerFactory.

Let me know if you run into problems.

Re: namespace prefixes [message #1008501 is a reply to message #1008331] Tue, 12 February 2013 18:18 Go to previous message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Thanks Robert.!
Previous Topic:Release 0.2.2 now available
Next Topic:Full custom tab
Goto Forum:

Current Time: Sun Sep 26 03:28:33 GMT 2021

Powered by FUDForum. Page generated in 0.01975 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top