question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 task y => I want the result to be a template task y 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, template B 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:closed
  • Created a year ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
nikkucommented, Mar 30, 2022

Decided (@MaxTru, @nikku), based on prior discussion: We’ll incorporate this into properties-panel@1. Moving to ready.

0reactions
nikkucommented, Apr 1, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Element template issue - PI Square - OSIsoft
Hi! I have encountered a strange issue with one of my Element templates concering its Analyses. I want the Analysis to use an...
Read more >
Where did my Element Template Go - OpenRoads | OpenSite
The best way to guarantee that your desired Element Templates are available in your workspace is to use the MS_DGNLIBLIST_ELEMENTTEMPLATES to ...
Read more >
javascript - Vue: template can't be keyed, but can't replace ...
If I replace template with span or div , it works, but the styling is all out of place, so I need it...
Read more >
Using templates and slots - Web Components | MDN
This article explains how you can use the <template> and <slot> elements to create a flexible template that can then be used to...
Read more >
Switching templates in version 7.0 FAQ
It's not possible to change templates on a version 7.1 site. In version 7.0, you switch templates to get access to different features....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found