Properties panel could not get extended attribute for custom element

Hi,
I am using custom-elements, and I have added properties-panel. I added an extended attribute to the custom element, but it is not available when opened again. How can I solve this problem?
Thank you!
image
image
image

Hi @lhzxxy,

to use your custom elements with the PropertiesPanel you will have to create your own PropertiesProvider. Take a look on this example.

@Niklas_Kiefer
Thank you. I’ll try it.

I’m not sure if the example you mentioned suits your use case. Can you explain what you are trying to achieve?

I want to add arbitrary attributes to custom element like “Add Property”. So I added properties-panel to custom-elements, then used “Add Property” to add attributes and saved it, but when I opened it again, error happend. Finally, I wrote a simple property panel to add attributes to custom element.

Do you want your custom elements to be valid BPMN 2.0 elements?

Yes, if the custom element is the same as the valid BPMN 2.0 element, some trouble can be solved, but it doesn’t seem to be when we use the demo.

The example you’re using doesn’t create custom elements that can be part of a valid BPMN 2.0 diagram.

Have you had a look at this example: https://github.com/bpmn-io/bpmn-js-custom-elements-example