-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Headers / inputs are not cleaned when switching between element templates #653
Comments
@marstamm considering you investigated the replace behavior in general, could you please have a look? |
I checked it and can confirm that the old Input Mappings & Headers are only removed when the new Template declares Input Mappings of their own. This seems to be done on purpose: bpmn-js-properties-panel/src/provider/cloud-element-templates/cmd/ChangeElementTemplateHandler.js Lines 294 to 297 in d969300
But I could not find the reasoning in the PR or Issue that contributed it. I think we are safe to remove this restriction |
This is legacy (C7 2016) behavior. Our assumption in the past was that element templates work along with existing configuration. Since then we've made it impossible to show specific existing bindings next to the element templates (entriesVisible). We could keep this behavior for C7, if we desire; we should move to a more consistent replace/clean anything for C8 templates. CC @MaxTru |
Describe the bug
The overall "check if properties are still valid during replace" interaction has a bug that affects changing from one element template to another where the first and second are distinct in their binding types (i.e. the first defines only inputs, the second one only headers).
In that case the properties are not cleaned up (inputs stay configured) despite the second template not having input bindings. Breaks the other way around, too.
Steps to reproduce
You can find two example templates to reproduce this here.
<a>
<a>
binding is not cleaned upI believe this is due to our C7 legacy of "only touching what has been defined"; it does not seem to be the appropriate behavior for C8 anymore.
Expected Behavior
Bindings (inputs, headers) are cleaned up completely, despite the new template not using them.
Originally posted by @nikku in #648 (comment)
The text was updated successfully, but these errors were encountered: