Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide on the shared clipboard #2124

Open
barmac opened this issue Mar 1, 2021 · 5 comments
Open

Decide on the shared clipboard #2124

barmac opened this issue Mar 1, 2021 · 5 comments
Labels
backlog Queued in backlog modeling needs discussion Needs further discussion

Comments

@barmac
Copy link
Contributor

barmac commented Mar 1, 2021

What should we do?

In Camunda Modeler, the clipboard is shared between BPMN diagrams. This means that you can copy an element from diagram_1.bpmn and paste it to diagram_2.bpmn.

However, you cannot easily copy an element with Camunda properties to a Zeebe diagram (and Zeebe properties to a Camunda diagram respectively) as this leads to errors. For example, zeebe:FormDefinition does not have any execution meaning within Camunda Workflow Engine. Because of that, we've decided to not include the shared clipboard in #2107.

I can see three different options how to solve this problem:

  • disable shared clipboard (as in Distinguish camunda and zeebe diagrams #2107)
  • allow to copy and paste elements but ignore process engine-specific properties (this requires additional work)
  • try to convert the elements (rather infeasible)

Why should we do it?

Let's make an informed decision to replace the temporary solution or leave it as it is.

@barmac barmac added needs discussion Needs further discussion modeling labels Mar 1, 2021
barmac added a commit that referenced this issue Mar 1, 2021
barmac added a commit that referenced this issue Mar 1, 2021
@nikku
Copy link
Member

nikku commented Mar 1, 2021

I personally favor option two. The other options look rather odd.

Could you elaborate how that causes errors / harm? Would love to get a better understanding.

@barmac
Copy link
Contributor Author

barmac commented Mar 1, 2021

The element is not pasted and en error is logged:

[diagram_1.bpmn] unknown type <zeebe:FormDefinition>
    at Registry.mapTypes (webpack-internal:///../../camunda-bpmn-js/node_modules/moddle/dist/index.esm.js:525:11)
    at Registry.getEffectiveDescriptor (webpack-internal:///../../camunda-bpmn-js/node_modules/moddle/dist/index.esm.js:550:8)
    at BpmnModdle.Moddle.getType (webpack-internal:///../../camunda-bpmn-js/node_modules/moddle/dist/index.esm.js:775:32)
    at BpmnModdle.Moddle.create (webpack-internal:///../../camunda-bpmn-js/node_modules/moddle/dist/index.esm.js:743:19)
    at BpmnFactory.create (webpack-internal:///../../camunda-bpmn-js/node_modules/bpmn-js/lib/features/modeling/BpmnFactory.js:68:29)
    at ModdleCopy.copyProperty (webpack-internal:///../../camunda-bpmn-js/node_modules/bpmn-js/lib/features/copy-paste/ModdleCopy.js:241:40)
    at eval (webpack-internal:///../../camunda-bpmn-js/node_modules/bpmn-js/lib/features/copy-paste/ModdleCopy.js:222:29)
    at eval (webpack-internal:///../../camunda-bpmn-js/node_modules/min-dash/dist/index.esm.js:221:14)
    at forEach (webpack-internal:///../../camunda-bpmn-js/node_modules/min-dash/dist/index.esm.js:181:16)
    at reduce (webpack-internal:///../../camunda-bpmn-js/node_modules/min-dash/dist/index.esm.js:220:3) [ error ]
This error may be the result of a plug-in compatibility issue. [ info ]
Disable plug-ins (restarts the app) [ info ]
unknown type <zeebe:FormDefinition>
    at Registry.mapTypes (webpack-internal:///../../camunda-bpmn-js/node_modules/moddle/dist/index.esm.js:525:11)
    at Registry.getEffectiveDescriptor (webpack-internal:///../../camunda-bpmn-js/node_modules/moddle/dist/index.esm.js:550:8)
    at BpmnModdle.Moddle.getType (webpack-internal:///../../camunda-bpmn-js/node_modules/moddle/dist/index.esm.js:775:32)
    at BpmnModdle.Moddle.create (webpack-internal:///../../camunda-bpmn-js/node_modules/moddle/dist/index.esm.js:743:19)
    at BpmnFactory.create (webpack-internal:///../../camunda-bpmn-js/node_modules/bpmn-js/lib/features/modeling/BpmnFactory.js:68:29)
    at ModdleCopy.copyProperty (webpack-internal:///../../camunda-bpmn-js/node_modules/bpmn-js/lib/features/copy-paste/ModdleCopy.js:241:40)
    at eval (webpack-internal:///../../camunda-bpmn-js/node_modules/bpmn-js/lib/features/copy-paste/ModdleCopy.js:222:29)
    at eval (webpack-internal:///../../camunda-bpmn-js/node_modules/min-dash/dist/index.esm.js:221:14)
    at forEach (webpack-internal:///../../camunda-bpmn-js/node_modules/min-dash/dist/index.esm.js:181:16)
    at reduce (webpack-internal:///../../camunda-bpmn-js/node_modules/min-dash/dist/index.esm.js:220:3) [ error ]
This error may be the result of a plug-in compatibility issue. [ info ]
Disable plug-ins (restarts the app) [ info ]

@nikku
Copy link
Member

nikku commented Mar 1, 2021

Pretty cool. This means the only thing we need is to check whether we "know such elements" and ignore them during pasting all together?

@barmac
Copy link
Contributor Author

barmac commented Mar 1, 2021

That's what I would test first. So sth like:

if (!moddle.canCreate(propertyOrElement)) {
  return false;
}

@pinussilvestrus pinussilvestrus added the backlog Queued in backlog label Mar 31, 2021 — with bpmn-io-tasks
@falko
Copy link
Member

falko commented May 21, 2021

This could have been a workaround for #2283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog modeling needs discussion Needs further discussion
Projects
None yet
Development

No branches or pull requests

4 participants