public Void execute(CommandContext commandContext) {
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);
List<MessageCorrelationResult> correlationResults = correlationHandler
.correlateMessages(commandContext, messageName, correlationSet);
for (MessageCorrelationResult correlationResult : correlationResults) {
if (MessageCorrelationResult.TYPE_EXECUTION.equals(correlationResult.getResultType())) {
triggerExecution(commandContext, correlationResult);