can someone point me in the right direction of how I can customise the palette and change type popup ?
In our particular example - we dont want to allow all types of process events ( so - hide the “intermidateThrowEvent” from the palellte for example).
Also - when you get the “spanner” tool for “Change Type” - I need to be able to customise the list of types that appear there too.
Thanks in advance.
First off the palette, to customize it to your needs you should look at the
paletteProvider inside the palette module. There you can add and remove the palette entries that you wish for.
With spanner tool, I guess you’re referring to the
replace menu. You can check it’s module and inside you’ll find a
BpmnReplace.js file that takes care of the logic behind the actual replacement of bpmn elements and you’ll find a
ReplaceOptions.js, which carries with it which options should be shown when it is opened for the selected shape.
Should I edit the original files - or is there someway to override these things in the “app.js” ?
you can override it in the app.js.
You have to make a copy of the module you want to override and change your code.
Afterwards you register the new module during the initilisation.
Watch the Example in the Comment.
@zzpa, You got to hide some “types” in the palette element? I need hide some elements type of the list “change type” option.
Could show how to do this? What modules do I need to override to disable the option ‘Change type’ in contextPad for Pool element or remove the “Expanded Subprocess” element in toolbar?
Did anyone found the solution how to add/remove menu with out edit core file “ReplaceOptions.js”