try {
Map<String, Object> variables = VariableValueDto.toMap(parameters.getVariables(), engine, objectMapper);
String businessKey = parameters.getBusinessKey();
String caseInstanceId = parameters.getCaseInstanceId();
instance = runtimeService.startProcessInstanceById(processDefinitionId, businessKey, caseInstanceId, variables);
} catch (ProcessEngineException e) {
String errorMessage = String.format("Cannot instantiate process definition %s: %s", processDefinitionId, e.getMessage());
throw new RestException(Status.INTERNAL_SERVER_ERROR, e, errorMessage);