recently I tried to create element templates for our most common use cases to speed up development of new workflows. Following the documentation this was pretty straight forward for most of my use cases. The only remaining ones were elements which attempt to set an execution listener automatically. Sadly, I was not able to figure out how to do this for class-based execution listener. I only found the option to configure the value as script as well as the scriptFormat.
I just had some time to look into it in more detail myself.
I discovered that per json schema there is a parameter called “name” for property bindings. Also I was not able to find any restrictions on this parameter. So, in theory, I should be able to use following template to achieve my goal. (Obviously I shortened it for the sake of simplicity)
By debugging I now discovered there is only special handling for inline scripts. If that is not the case, as in my example, the value will always be set as “value” property. Thus, the configured “name” attribute for the binding is not respected.
Should I create an issue at bpmn-js or which repo would be the correct one? Also, I would be happy to contribute with a pull request for this issue if possible.
Kind regards
Adagatiya
PS.: A good entry point for this issue is the editor action called “applyElementTemplate”.