camunda-modeler icon indicating copy to clipboard operation
camunda-modeler copied to clipboard

Cannot open a diagram if executionPlatformVersion is unknown

Open barmac opened this issue 3 years ago • 14 comments

Describe the Bug

When I try to open this diagram which is a valid BPMN but with modeler:executionPlatformVersion="7.14.0, Modeler displays a dialog and refuses to display the diagram.

<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" id="Definitions_1snrxfq" targetNamespace="http://bpmn.io/schema/bpmn" xmlns:modeler="http://camunda.org/schema/modeler/1.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.14.0">

image

Steps to Reproduce

  1. Download the nightly
  2. Try to open the diagram
  3. now this happens

Expected Behavior

Modeler should never refuse to open valid BPMN 2.0 diagrams. It could warn the user about unsupported execution platform instead.

Environment

  • OS: MacOS
  • Camunda Modeler Version: nightly as of 17.01.2022
  • Execution Platform: Camunda Platform 7.14.0
  • Installed plug-ins: none

Additional context

barmac avatar Jan 17 '22 12:01 barmac

The rationale behind this is:

  • The Modeler can deal with diagrams which dont have an exectionPlatformVersion set
  • If the Modeler reads an unknown exectuinPlatformVersion, it will not open the file. Consider the cases:
    • foobar => does not make sense. Also why would a user set it? Hence rejection is okay
    • 7.22 => may not be supported by the current modeler version. Hence rejction is okay
    • 7.14 => some old version. Note that setting to 7.14.0 in the first place must have been a manual activity. Hence rejection is okay

MaxTru avatar Jan 20 '22 08:01 MaxTru

After conversation with Maciej I am reopening this. This is valid feedback and the decision we made (see previous comment) may be revised. We will just leave this open to have a issue to collect feedback on this. We will not take any action for now.

MaxTru avatar Jan 20 '22 09:01 MaxTru

I do believe a simple thing we could do is the following:

  • accept all well known versions of Camunda Platform; only allow to set recent versions

But I also fully understand your rationale @MaxTru to not act upon this right now.

nikku avatar Jan 20 '22 13:01 nikku

Would be interesting to figure out what leads a user to enter an unsupported (because too old) execution platform version in the first place.

nikku avatar Jan 20 '22 13:01 nikku

In the Platform Forum questions about old versions appear quite often. From my perspective, restricting them will cause more trouble than enforcing them.

If users set the version to 7.1 or even 7.0, why not?

You may just skip some checks that you implemented on the version value.

ingorichtsmeier avatar Jan 20 '22 16:01 ingorichtsmeier

Thanks for the feedback Ingo.

I suggest we invest into the solution proposal by @nikku

accept all well known versions of Camunda Platform; only allow to set recent versions

  • Addition to be clear: linting will only kick in for known versions (obviously)

MaxTru avatar Jan 20 '22 16:01 MaxTru

Also reported by Joe: https://camunda.slack.com/archives/CKGH9LR40/p1654015215747929

MaxTru avatar May 31 '22 18:05 MaxTru

Will not be able to do it this iteration

MaxTru avatar Jun 21 '22 08:06 MaxTru

Hi @MaxTru ,I have a similar issue. I'm happy this is an open issue that is being worked on to resolve going forward. It is not clear, how or if, I can edit the XML to open and edit all my process documents generated by an older version of Camunda ?

schreuder71 avatar Jul 15 '22 10:07 schreuder71

Hi @schreuder71,

In the XML, find bpmn:definitions (it should be the top-most element), and modify it as in the diff below:

- <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" id="Definitions_0rih9zo" targetNamespace="http://bpmn.io/schema/bpmn" xmlns:modeler="http://camunda.org/schema/modeler/1.0" exporter="Camunda Modeler" exporterVersion="5.0.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.14.0">
+ <bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" id="Definitions_0rih9zo" targetNamespace="http://bpmn.io/schema/bpmn" xmlns:modeler="http://camunda.org/schema/modeler/1.0" exporter="Camunda Modeler" exporterVersion="5.0.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">

Specifically, it's this part:

- modeler:executionPlatformVersion="7.14.0">
+ modeler:executionPlatformVersion="7.15.0">

barmac avatar Jul 15 '22 10:07 barmac

Excellent. Thank you that worked.

schreuder71 avatar Jul 15 '22 12:07 schreuder71

This is coming up more often then expected. We've seen around ~150 users being affected in the last 14 days, likely due to the following scenario:

  • User creates diagram with a newer modeler version
  • Colleague tries to open diagram with an older modeler version
  • We throw with an error

A resolution could be, as suggested, to handle this issue more gracefully:

  • Be optimistic about future engine version support (still open, assume latest known version, indicate miss-match)
  • Be optimistic about past version support (still open, assume no version being set)

nikku avatar Jun 06 '23 11:06 nikku