Do not carry over element templates during replacement
See original GitHub issue_Context: https://github.com/bpmn-io/bpmn-js-properties-panel/pull/632, specifically https://github.com/bpmn-io/bpmn-js-properties-panel/pull/632#pullrequestreview-924627721._
Describe the context
In the C7 world element templates [are] had unclear semantics a template could be applied to various elements “operating on top of these elements” and being carried around as the underlying element type changed. Not sure how useful that feature was in the first place, but that is how it worked.
With C8 + future bpmn-js templated elements will become dedicated, first class citizens on the diagram. We call them “email task”, “email connector”, and they shall be thought of as dedicated entities, “templated tasks”, “connector tasks” rather than something put on top of an existing task, i.e. “service task with email template applied”. Cf. mental model, Connectors Solution Architecture).
In this context it does not make a lot of sense to carry over the element template as I switch from one task to another:
- I switch from template task
x
to service task => I want the results to be a plain service task - I switch from template task
x
to template tasky
=> I want the result to be a template tasky
with whatever base type is specified
If we don’t go this direction we may end up in a situation where I cannot get rid of a template via replace anymore; in some contexts thought replace is the only thing we got (i.e. web-modeler or (future) no-properties modeling).
Describe the solution you like
We should consider removing templates during replace or create a dedicated mechanism to replace, removing templates; we shall not automagically re-apply the template on the new element.
Our existing rules on keeping properties “as fit” shall continue to apply:
- Switching from a email task (built on top of a service task) to a service task keeps compatible bindings (i.e. input/output bindings)
- Switching from an email task to a user task keeps all compatible bindings
- Switching from a send task with template
A
to a service task, templateB
changes the task type, applies a new template and carries over all compatible bindings
_Originally posted by @nikku in https://github.com/bpmn-io/bpmn-js-properties-panel/pull/632#pullrequestreview-924627721_
Issue Analytics
- State:
- Created a year ago
- Comments:13 (13 by maintainers)
Top GitHub Comments
Decided (@MaxTru, @nikku), based on prior discussion: We’ll incorporate this into properties-panel@1. Moving to ready.
I’m aware of that, but I also opened https://github.com/bpmn-io/bpmn-js-connectors-extension/issues/32 to follow up. Best is if we don’t need to hack it into the core.