Mismatching Message Correlation Exception

i want to send a correlation message to the receive task of my bpmn but with the default behavior the message will be send when the event is reeived from an other microservices of mine .

i send the event with like this :
.setVariable(messageName, name)
but when the received task isn’t active i have the exception of mismatching message correlation which is the normal behavior because the receive task isn’t in an active state in that specific moment.

is there any solution to make the correlation message sent when the recieve task correspending it is active .

i’m using camunda 7.20 and spring boot 3.1.1

You can query for event subscriptions.

1 Like

Using Java APIs

EventSubscriptionQuery eventSubscriptionQuery = runtimeService.createEventSubscriptionQuery();

// Set query conditions
eventSubscriptionQuery.eventType("message");  // Filter by event type
eventSubscriptionQuery.eventName("msg_name");  // Filter by event name

// Execute the query and retrieve the results
List<EventSubscription> eventSubscriptions = eventSubscriptionQuery.list();
1 Like

Thank you for your help with my issue.
Your solution worked perfectly, and I’m incredibly grateful for your support.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.