try {
VariableMap variables = VariableValueDto.toMap(triggerDto.getVariables(), engine, objectMapper);
runtimeService.messageEventReceived(messageName, executionId, variables);
} catch (ProcessEngineException e) {
throw new RestException(Status.INTERNAL_SERVER_ERROR, e, String.format("Cannot trigger message %s for execution %s: %s",
messageName, executionId, e.getMessage()));
} catch (RestException e) {
String errorMessage = String.format("Cannot trigger message %s for execution %s: %s", messageName, executionId, e.getMessage());
throw new InvalidRequestException(e.getStatus(), e, errorMessage);