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.

Updating the element templates with camunda:Connector leads to duplicated <camunda:connector> element in XML

See original GitHub issue

Describe the bug

Given one template on my local machine

When I make a change to it i.e. increase the version number The upgrade is correctly suggested in the UI. ✔️

When upgrade to the newer version Then the one camunda:connector element in the XML is not replaced, but it is duplicated. ❌

Steps to reproduce

  1. Create a new template in your element-template folder in your Camunda Desktop Modeler installation with the following content:

This is the same template example provided here that uses the Camunda 7 Connectors. See docs here and here

{
  "$schema": "https://unpkg.com/@camunda/element-templates-json-schema/resources/schema.json",
  "name": "ConnectorGetTask-LOCAL",
  "id": "9a158cf8-c500-40d8-90a5-c4a62727684110",
  "appliesTo": [
    "bpmn:Task"
  ],
  "version": 1,
  "properties": [],
  "scopes": [
    {
      "type": "camunda:Connector",
      "properties": [
        {
          "label": "ConnectorId",
          "type": "String",
          "value": "My Connector HTTP - GET",
          "binding": {
            "type": "property",
            "name": "connectorId"
          }
        },
        {
          "label": "Method",
          "type": "String",
          "value": "GET",
          "binding": {
            "type": "camunda:inputParameter",
            "name": "method"
          }
        },
        {
          "label": "URL",
          "type": "String",
          "value": "https://bpmn.io",
          "binding": {
            "type": "camunda:inputParameter",
            "name": "url"
          }
        },
        {
          "label": "Response",
          "type": "String",
          "value": "wsResponse",
          "binding": {
            "type": "camunda:outputParameter",
            "source": "${S(response)}",
            "scriptFormat": "freemarker"
          }
        }
      ]
    }
  ]
}
  1. Create a new C7 BPMN diagram and add a task to it

  2. Apply the template to the task and save

  3. Increase the version number in the template from 1 to 2

  4. Go to your diagram from (3.) and Upgrade the template

  5. Open the XML view and see two entries of camunda:connector in the XML

See screen recording:

https://user-images.githubusercontent.com/25924333/192004921-64472a7e-0147-4a23-82f9-e49a746341ff.mov

And the only difference between the two templates is the version:

Screenshot 2022-09-23 at 18 01 28

Expected behavior

The upgrade of the template should replace my cammunda:Connector, not duplicate it.

Environment

  • OS: all
  • Camunda Modeler Versions : tested in v4.12.0 and v5.3.0
  • Execution Platform: Camunda Platform 7
  • Installed plug-ins: Cawemo Cloud Connect Plugin

Additional context

The issue has been reported by a customer via SUPPORT-14645

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nikkucommented, Sep 27, 2022

Low effort to patch release this. We have an existing process + branching strategy in place.

0reactions
sghidiucommented, Oct 25, 2022

Hi Team, customer has migrated their plugins to V5.x now. Is it possible to get a timeline for a fix on V5?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Duplicate xml elements - Stack Overflow
See my answer for the shortest (number of lines, number of templates) and simplest (no modes, no xsl:for-each , no parameters) solution so...
Read more >
Camunda modeler element-templates - Camunda Forum
I would like to build templates with predefined fields. I created service task (implementation Connector) configured details in Connector tab
Read more >
Where are the element templates in VP 12.1?
The short answer – Workspace ... Doc. Composer comes with a set of built-in element templates written in XML, and you can also...
Read more >
XML Publisher and Concurrent Manager Integration - Oracle
RTF Templates can be produced in Microsoft Word. Using Word's form field feature, insert the XML data element names and other XML Publisher...
Read more >
Map XML elements to cells in an XML Map - Microsoft Support
Access creates the new table and displays it in the Navigation Pane. Export the data from the linked table to an XML data...
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