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
What I need:
<camunda:executionListener class="path.to.my.class" event="start" />
What I was able to achieve:
I appreciate any idea on this, because I would prefer to not refactor my execution listeners.
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)
"label": "Implementation Type",
The result is the following:
<camunda:executionListener event="start" value="path.to.my.class>
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.
PS.: A good entry point for this issue is the editor action called “applyElementTemplate”.
I was able to identify the bpmn-io/bpmn-js-element-templates repo as responsible for the described behaviour and created an issue over there: Property bindings of type “camunda:executionListener” ignores name property · Issue #13.
In consequence this thread seems solved. A solution will be provided trough the github issue.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.