ensureAtLeastOneNotNull("At least one of the following correlation criteria has to be present: "
+ "messageName, businessKey, correlationKeys, processInstanceId", messageName, businessKey, correlationKeys, processInstanceId);
CorrelationHandler correlationHandler = Context.getProcessEngineConfiguration().getCorrelationHandler();
CorrelationSet correlationSet = new CorrelationSet(businessKey, processInstanceId, correlationKeys);
MessageCorrelationResult correlationResult = correlationHandler.correlateMessage(commandContext, messageName, correlationSet);
if (correlationResult == null) {
throw new MismatchingMessageCorrelationException(messageName, "No process definition or execution matches the parameters");