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

No differentiation between Message Start and Intermediate Events for the correlation key #323

Open
hkupitz opened this issue Jul 13, 2023 · 5 comments
Labels

Comments

@hkupitz
Copy link

hkupitz commented Jul 13, 2023

Describe the bug

When checking a process with a Message Start Event that has a message name configured, the check results in the following task:

image

TASK: Please define a correlation key.

As a message start event does not allow to define a message correlation key directly in the BPMN for Camunda 8, this is not accurate.

Steps to reproduce

  1. Create a Camunda 7 BPMN diagram starting with a Message Start Event.
  2. Assign a Global message reference to the event.
  3. Run the diagram converter.

Expected Behaviour

The above mentioned converter check should not result in a "correlation key" task.

Library version

0.6.2

Camunda version

7.19

@jonathanlukas
Copy link
Collaborator

@hkupitz thank you for this bug report.

Indeed, this is a complex topic as the correlationKey is defined in the message element itself, which has no knowledge about where is is referenced.

I see 2 alternatives:

  • remove the task message completely and rely on the native linting the modeler has embedded already (I prefer that one)
  • adjust the task message to state something like Please define a correlation key if the element is no start event (which is a bit verbose)

cc: @ingorichtsmeier wdyt?

@ingorichtsmeier
Copy link
Contributor

@hkupitz and @jonathanlukas,

all Zeebe clients always require a correlation key for publishing messages. My assumption is, that we need a new command for the GRPC spec like publishStartMessage where the correlation key is optional.

As long as we don't have a solution for an optional correlation key, we should keep it as it is.

@jonathanlukas
Copy link
Collaborator

@ingorichtsmeier it works on zeebe side. The only "flaw" is that correlation keys are not required on the model as long as only a start message event uses the message.

@ingorichtsmeier
Copy link
Contributor

it works on zeebe side

May be. But in the Java client I have to write

zeebeClient.newPublishMessageCommand().messageName(messageName).correlationKey(correlationKey)

before I can add .send().

And zbctl says

$ zbctl publish message a
Error: required flag(s) "correlationKey" not set

The command cannot be sent without a correlation key.

@jonathanlukas
Copy link
Collaborator

True. The correlation key for a start event is "hidden" for the rest of the process instance execution, but required for implementation of messaging pattern:

https://docs.camunda.io/docs/components/concepts/messages/#message-patterns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment