Add element templates in the properties panel


#1

Hello,

I would like to create custom tasks using the element templates. I m using properties-panel project (https://github.com/bpmn-io/bpmn-js-examples/tree/master/properties-panel) ,
I created a json file containg the templates and stored it under resources/element-templates, Also I updated the code in index.js like this:

var templates = require(’…/resources/element-templates/templates.json’);

var bpmnModeler = new BpmnModeler({
container: canvas,
propertiesPanel: {
parent: ‘#js-properties-panel
},

additionalModules: [
propertiesPanelModule,
propertiesProviderModule
],
elementTemplates: templates,
moddleExtensions: {
camunda: camundaModdleDescriptor
}
});
But the element template is not showing in the properties panel. Am I missing something? Or the json file and code modification should be elsewhere?


#2

Hi @attrik

Maybe it is caused by the templates.json itself. Could you print the content of this file? Also, you might find help here.


#3

Thanks Niklas_Kiefer for your reply.
I am using this template : https://github.com/bpmn-io/bpmn-js-properties-panel/blob/master/test/spec/provider/camunda/element-templates/cmd/mail-task.json.

should I make some modifications in it?