How can I access the validation errors from the bpmn-js-properties-panel? I would like to validate the each property in the properties panel once the user tries to deploy a model then display the errors to the user and not allow the model to be deployed.
I have tried to get them by document.getElementsByClassName but they only appear if the validation error is rendered on the page
Hi @Devin_B, welcome to the forum! The properties panel itself does not provide many validation errors itself, I think the ID validation you mention is the only one.
It rather uses tools like camunda/linting to show these errors via API. I think you can adopt this one to achieve what you want.
Do you know if I can simply turn off the ID validation on the properties panel?
Or are you able to tell me how this process ID validation error is being generated? How does it know that the process ID is unique or not? Is it somehow calling the camunda api to check against previously deployed process ID’s?
I don’t believe that the process ID has to be unique anyways since the most recent one would be set as an active process definition.
To remove this validation, you would have to override the IdProps entry via custom properties provider. Notice that duplicated IDs inside a BPMN 2.0 diagram are not valid against the schema, and any (proper) BPMN engine will reject this.