If I define a moddle file with bpmn-js like this
{
name: "thisArgument",
superClass: [
"Element"
],
properties: []
},
{
name: "myData",
superClass: [
"Element"
],
properties: [
{
name: "argument",
type: "thisArgument"
}
]
},
Then the resulting XML (when I call saveXML) will have an element called thisArgument
, despite the fact that the name is "argument". First, is that a bug? If not, how do I control the output so that the XML contains argument
rather than thisArgument
? I've searched the docs and examples but can't find how to do this.
The only workaround I found was to make it type: "argument"
and then define argument
with a superClass of thisArgument
and no extra properties (essentially making an alias). However, that only works if all instances of argument
are identical. Eg. if the XML needed to be
<A><argument/></A>
<B><argument/></B>
where the argument in A has a different shape than the argument in B, then there would be a conflict since I can't define argument
twice.