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

Ensure interoperability with connectors extension #211

Closed
3 of 6 tasks
Tracked by #1627
nikku opened this issue Dec 5, 2022 · 13 comments · Fixed by #213
Closed
3 of 6 tasks
Tracked by #1627

Ensure interoperability with connectors extension #211

nikku opened this issue Dec 5, 2022 · 13 comments · Fixed by #213
Assignees

Comments

@nikku
Copy link
Member

nikku commented Dec 5, 2022

What should we do?

Ensure the newly implemented replace menu plays nicely with the connectors extension.

Why should we do it?

We are able to transition smoothly between both versions.


Related to #214.

@nikku
Copy link
Member Author

nikku commented Dec 5, 2022

CC @smbea. I'm currently looking into this.

@nikku nikku self-assigned this Dec 5, 2022
@smbea smbea added the ready Ready to be worked on label Dec 5, 2022
@nikku
Copy link
Member Author

nikku commented Dec 5, 2022

We double register "replace back to plain element":

image

@nikku
Copy link
Member Author

nikku commented Dec 5, 2022

Mouting replace menu fails on sub-process:

capture XG2q3B_optimized

@smbea
Copy link
Contributor

smbea commented Dec 5, 2022

We double register "replace back to plain element":

This can be prevented by checking if it's there first

Mouting replace menu fails on sub-process:

That one I have to check, not sure what is going on

@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed ready Ready to be worked on labels Dec 5, 2022
@nikku
Copy link
Member Author

nikku commented Dec 5, 2022

Mouting replace menu fails on sub-process:

That one I have to check, not sure what is going on

I can provide a fix for this one @smbea

@nikku
Copy link
Member Author

nikku commented Dec 5, 2022

We double register "replace back to plain element":

This can be prevented by checking if it's there first

Two options to fix this:

  • Check (in either place) if the thing already exists
  • Ensure both use the same keys (currently replace-with-service-task -> camunda-bpmn-js, replace-unlink-element-template -> connectors extension).

If we decide to use the same entry ID we should settle down on one of them; if we want to distinguish replace-with-service-task from the unlink option (i.e. during tracking) I'd say, let's call this thing replace-unlink-element-template.

@smbea
Copy link
Contributor

smbea commented Dec 5, 2022

My initial thought was that although for us it's replace-unlink-element-template, to the user it means replace-with-service-task. But since it's not really something shown in the UI and the first option might be more beneficial to us during tracking, maybe let's go with replace-unlink-element-template.

@nikku
Copy link
Member Author

nikku commented Dec 5, 2022

Entries to apply element template appear twice due to different IDs:

image

Same root cause + resolution like #211 (comment) I think @smbea.

@smbea
Copy link
Contributor

smbea commented Dec 5, 2022

The fix for the first situation (unlink template) would be this: https://github.com/camunda/camunda-bpmn-js/compare/211-change-unlink-template-action-name

But actually, changing the id here doesn't fix the issue for the last case mentioned because the entries still differ (the entries fed from here have groups and the others have categories. And those aren't translated since they aren't fed through here, they are fed through the connectors extension @nikku

@nikku
Copy link
Member Author

nikku commented Dec 5, 2022

But actually, changing the id here doesn't fix the issue for the last case mentioned because the entries still differ

The entries have different IDs as well, hence multiple ones are attached, I think?

@smbea
Copy link
Contributor

smbea commented Dec 5, 2022

They do. But what I'm saying is: changing the ids to match with the ones given in the connectors extension doesn't fix the issue, because of how they are added https://github.com/bpmn-io/bpmn-js-connectors-extension/blob/08816c046cc42adc470052826f56bdd4ca9bc52f/src/replace-menu/ReplaceMenu.js#L98. Since the entries still differ (category vs group for example), they are added on top.

I added a WIP commit here if you want to test it out.

@smbea
Copy link
Contributor

smbea commented Dec 5, 2022

As agreed, let's not push this for Modeler 5.6.0 since there are still some loose ends we need to align regarding the usage with the connectors extension

@nikku
Copy link
Member Author

nikku commented Dec 5, 2022

#211 (comment)

@smbea this is fixed via bpmn-io/bpmn-js-connectors-extension#55. There is no good reason why the connectors extension shall not adhere to the existing replace menu contract (keying element uniquely, by ID).

nikku added a commit that referenced this issue Dec 5, 2022
Use existing pattern to allow interop with connectors extension.

Related to #211
nikku added a commit that referenced this issue Dec 5, 2022
Use existing pattern to allow interop with connectors extension.

Related to #211
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Dec 5, 2022
smbea pushed a commit that referenced this issue Dec 6, 2022
Use existing pattern to allow interop with connectors extension.

Related to #211
@smbea smbea closed this as completed in #213 Dec 6, 2022
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants