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 :
runtimeService.createMessageCorrelation(messageName)
.setVariable(messageName, name)
.correlate();
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 .
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();