Thank you so much @Hadi_Jami, it worked for me on JS, I tried it on an Angular8 project but did not work at all, but I realize a solution for this specific case, in this case (Angular) you don’t set the moddleExtensions Param like we always do, we just set the Modeler:
public modeler: any;
this.modeler = new BpmnModeler({
container: '#canvas',
width: '100%',
height: '600px',
additionalModules: [
customControlsModule,
{ [InjectionNames.bpmnPropertiesProvider]: ['type', OriginalPropertiesProvider.propertiesProvider[1]] },
{ [InjectionNames.propertiesProvider]: ['type', CustomPropsProvider] },
{ [InjectionNames.originalPaletteProvider]: ['type', OriginalPaletteProvider] },
{ [InjectionNames.paletteProvider]: ['type', CustomPaletteProvider] },
]
});
and then instance a BpmnModdle apart from the modeler this way:
public camundaModdle: any;
this.camundaModdle = new bpmnModdle({camunda: _camunda});
when _camunda is the Json object with the extensionModdle structure;
forward, you create the basic extension moddle
this.modeler.get(‘modeling’).updateProperties(this.modeler.get(‘elementRegistry’).get(this.element.element.id), {extensionElements: this.modeler.get(‘moddle’).create(‘bpmn:extensionElements’)});
or if it does not work just create the moddleExtension without updating properties:
this.modeler.get(‘moddle’).create(‘bpmn:extensionElements’);
after that, you only need to create your property
const properties = this.camundaModdle.create(‘camunda:Properties’);
and then push it to the extensionModdle values:
this.modeler.get(‘elementRegistry’).get(this.element.element.id).businessObject.extensionElements.get(‘values’).push(properties);
Hope it woukld be usefull to somebody else, once again, thanks @Hadi_Jami and everyone else!