yeah. thanks
And I saw this example, but in my project, it’s a little different.
That’s about it
// init
import jiuling from './jiuling.json'
new BpmnModeler({
container: this.$refs['bpmn-canvas'],
keyboard: this.keyboard ? { bindTo: document } : null,
additionalModules: {},
moddleExtensions: { jiuling }
})
// this is my description file
{
"name": "JiuLing",
"uri": "http://activiti.org/bpmn",
"prefix": "jiuling",
"xml": {
"tagAlias": "lowerCase"
},
"types": [
{
"name": "Base",
"superClass": [
"Element"
],
"meta": {
"allowedIn": [
"*"
]
},
"properties": [
{
"name": "id",
"type": "String",
"isAttr": true
},
{
"name": "values",
"type": "AssignessSelector",
"isMany": true
}
]
},
{
"name": "AssignessSelector",
"superClass": [
"Element"
],
"properties": [
{
"name": "id",
"type": "String",
"isAttr": true
},
{
"name": "type",
"type": "String",
"isAttr": true
},
{
"name": "name",
"type": "String",
"isAttr": true
},
{
"name": "variable",
"type": "String",
"isAttr": true
},
{
"name": "value",
"type": "String",
"isAttr": true
}
]
},
{
"name": "SkipDecider",
"superClass": [
"Element"
],
"properties": [
{
"name": "value",
"type": "Boolean",
"isAttr": true
},
{
"name": "type",
"type": "String",
"isAttr": true
}
]
},
{
"name": "Notify",
"superClass": [
"Element"
],
"properties": [
{
"name": "type",
"type": "String",
"isAttr": true
},
{
"name": "value",
"type": "Boolean",
"isAttr": true
}
]
}
]
}
And now I can create <jiuling:AssignessSelector />, it works
moddle.create('jiuling:AssignessSelector', {
type: 'wechat',
value: 'test'
})
But when I get this xml(string) by ajax and import thought ‘importXML’ function, <jiuling:AssignessSelector />
is ignored, and I don’t get any error or warnings.
I don’t know if I made a mistake. I hope I can correct my mistake