Be able to create an element from an element template
See original GitHub issueIs your feature request related to a problem? Please describe
As a user I am able to change an element to an element template of a specific type. I am also able to declare an element template as default; this ensures it is applied as the element is created.
What I am not able to do yet is to create an element of a specific type, i.e. because I want to create it right off the palette or append it:
We have a workaround for what I envision: Bootstrap the element (with all required extensions) manually, cf. ConnectorsExtension
. That, however forces me to know all element templates in advance; it is not a solution applicable for general template support.
Describe the solution you’d like
- It is possible to create an element of a specific type similar to
ElementFactory#create**
, i.e.elementTemplates.createElement(template: ElementTemplate): DiagramElement
- The element shall not be added to the canvas yet, but it shall be already configured to the extend needed.
Describe alternatives you’ve considered
Decide this is not a direction we want to go.
Additional context
This pops up in the context of connectors, specifically in the realm of how to integrate them nicely into the existing modeling UX.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (11 by maintainers)
Top GitHub Comments
To clarify: This feature request is about creating a diagram element of a specific type outside the core modeling cycle.
The use-case is that I want to pull that element out from the palette (into “hover state”), and preview it accordingly (or add it using existing modeling APIs).
Hope this answers your question.
Along with our Reflect & Plan, and given our current priorities (Web Modeler & Connectors), I will descope the API for Camunda Platform for now. We can (easily) add the same foundations to the
element-templates
provider once we need it. I added another issue for that: https://github.com/bpmn-io/bpmn-js-properties-panel/issues/607