camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.47k stars 473 forks source link

File type not re-checked upon reload #2279

Open falko opened 3 years ago

falko commented 3 years ago

Describe the Bug

The attached model is still detected as 'Camunda Platform' although it explicitely defines modeler:executionPlatform="Camunda Cloud"

Steps to Reproduce

  1. Open this file customer_onboarding_en.bpmn.txt
  2. Status bar shows 'Camunda Platform'

Expected Behavior

Status bar shows 'Camunda Cloud'

Environment


Related to https://github.com/camunda/camunda-modeler/issues/2283.

falko commented 3 years ago

I introduced the execution platform attribute via sed -i 's#xmlns:camunda="http://camunda.org/schema/1.0/bpmn"#xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="1.0.0"#g' *.bpmn and that worked fine for other files.

falko commented 3 years ago

Okay, now it worked for me after I closed the file and opened it again using the open file dialogue. It seems like the reload after the file got modified externally as well as closing the file and then 'reopen last file' do not check for the platform again.

pinussilvestrus commented 3 years ago

Yes, we are checking for the platform only on file opening (when we retrieve the correct tab type for the diagram). Makes sense to maybe do the checks way more often.

falko commented 3 years ago

Yes, please ;-)

falko commented 3 years ago

Well, you might as well fix the root cause and have an easy way to open Zeebe Modeler and Cawemo files as Camunda Cloud files or have an easy way to switch as discussed in #2283

nikku commented 3 years ago

@pinussilvestrus How complicated would https://github.com/camunda/camunda-modeler/issues/2279#issuecomment-845042751 be?

pinussilvestrus commented 3 years ago

It's not trivial. Our checkFileChanged handler is currently assuming the type of the tab did not change. We would have to break this up and recreate the tab if necessary.

nikku commented 3 years ago

We'll address the root cause of this issue by removing the + button, at least temporarily.

falko commented 3 years ago

The + button was not the root cause of this issue. This model has been migrated from Camunda Platform to Camunda Cloud. Models exported from Cawemo for use with Camunda Cloud face similar issues.

A better solution for switching the execution platform as discussed in #2283 or an actual migration of models without external tools would prevent this issue.

berndruecker commented 3 years ago

Could we rename this issue to "File type should be re-checked upon reload" to sort out the different problems?

Even the "Reopen last file" does not do a fresh check. This is pretty confusing in this context. I also face this problem when applying my little cloud -> platform migration plugin.