Upgrade bpmn-js to Version 13.2.0

Hi,
I have created my customElements using CustomElementFactory like in this example :
Custom Element with CustomElementFactory

I am trying to upgrade bpmn-js to the latest version 13.2.0 but I get the following error :
TypeError: this.createBpmnElement is not a function (line 80 of the above linked example)

And it also doesnt recognize the this.baseCreate(line 32 & 77 of the above linked example) function anymore. Do you know how can I solve this?

Thanks in advance!

What version of bpmn-js are you using?

I am currently using version 12.1.1.

It worked for me like this I replaced the functions like following

export default function CustomElementFactory(bpmnFactory, moddle) {

BpmnElementFactory.call(this, bpmnFactory, moddle);
const baseCreate = this.create.bind(this);

this.create = function(elementType, attrs) {

if (elementType === ‘label’) { return baseCreate( …) }
if (/^custom:/.test(type)) { … return baseCreate( elementType, attrs);}
return baseCreate( elementType, attrs);
}
}

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.