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

correlationKey does not get loaded when there is no collaboration #122

Open
burnettk opened this issue Dec 31, 2024 · 3 comments
Open

correlationKey does not get loaded when there is no collaboration #122

burnettk opened this issue Dec 31, 2024 · 3 comments

Comments

@burnettk
Copy link
Contributor

burnettk commented Dec 31, 2024

to repro in bpmn-js-spiffworkflow:

  1. create an xml file with a correlationKey and no collaboration
  2. open the xml file
  3. download the file
  4. the correlationKey node is gone

it is the same in spiff-arena, though if you add the element back after it is loaded by bpmn js (like by saving in the message editor), it will, in fact, be saved, since the issue manifests at load time, not download time.

@burnettk burnettk changed the title correlationKey does not loaded when there is no collaboration correlationKey does not get loaded when there is no collaboration Dec 31, 2024
@jasquat
Copy link
Contributor

jasquat commented Dec 31, 2024

Possible fixes would include:

  1. add a phantom collaboration if needed - this will not display on the diagram but will be in the xml
  2. add support for correlation keys at the root of a process using moddle exentions
  3. don't add any correlation keys ever

@burnettk
Copy link
Contributor Author

burnettk commented Jan 2, 2025

we discussed attempting option 1, and seeing if it seems to work, including for the use case where you later want to use the editor to actually create a collaboration that is visible on the diagram.

we believe that adding correlationKey nodes outside a collaboration node would result in invalid bpmn xml, so that is a point against option 2.

@jasquat
Copy link
Contributor

jasquat commented Jan 2, 2025

Adding the collaboration tag in the xml does indeed not display in the diagram and bpmn-js does not remove it on save. When a new collaboration is added, bpmn-js does add a whole new collaboration which may not be a problem really.

However, it seems like there is still another issue with this approach. It seems like the correlation key is not being used on the receive side. Even when it has the MainCorrelationKey, the message name is still being used for correlation key name.

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

No branches or pull requests

2 participants