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.

Introduce schema-version for element templates

See original GitHub issue

What should we do?

Currently, element templates don’t define a schema or schema-version that they adhere to.

This creates challenges:

  • When we are changing element templates, these might not work in older Modeler version. Hence when loading these element templates, the Camunda Modeler will just throw a generic error message.

However, a solution is already available: the https://github.com/camunda/element-templates-json-schema repo defines a versioned schema, which can be used to…

  • verify the validity of a given element template
  • ensure that only element templates, which are supported in the current Camunda Modeler version, are loaded.

This issue proposes the following changes:

Prio 1

Prio 2

Example

[
  {
    "$schema": "https://unpkg.com/@camunda/element-templates-json-schema@0.2.0/resources/schema.json",    
    "name": "Template 1",
    "id": "sometemplate",
    "version": 1,
    "appliesTo": [
      "bpmn:ServiceTask"
    ],
    "properties": [
      ...
    ]
  },
  {
    "name": "Template 2",
    ...
  }
]

Why should we do it?

This change will help us to manage changes in element templates in a more user-friendly way.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
MaxTrucommented, Mar 22, 2021

Only thing missing: update of docs

0reactions
MaxTrucommented, Mar 25, 2021

Did final smoke test including:

  • Unsupported schemaVersion shall be ignored
  • Tested old scopes array design for camunda:Connector
  • Tested new scopes object design for camunda:errorEventDefinitions

Great job everyone! Closing this issue (as @nikku stated, documentation is tracked seperately)

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSM document schema features and examples
Documents of type Command can use schema version 1.2, 2.0, and 2.2. ... example shows the top-level elements of an SSM document using...
Read more >
Defining templates - Camunda Platform 8 Docs
In case no $schema is defined, Camunda Modeler assumes the latest JSON Schema version for Camunda Platform 7 element templates. Learn more about...
Read more >
XML schema Element - W3Schools
This declaration tells the schema-validator that all the elements used in this XML document are declared in the "https://www.w3schools.com" namespace. Once you ...
Read more >
Introducing Custom Elements Manifest - Open Web Components
A custom-elements.json contains metadata about the custom elements in your project; their properties, methods, attributes, inheritance, slots, ...
Read more >
AF Element Template Versioning - PI Square - OSIsoft
Is there any reason why AF Element Templates do not have their own ... There are also performance reasons to not introduce versioning...
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