throw new ActivitiCdiException("Cannot use startProcessByName in an activiti command.");
}
ProcessDefinition definition = processEngine.getRepositoryService().createProcessDefinitionQuery().processDefinitionName(string).singleResult();
if (definition == null) {
throw new ActivitiObjectNotFoundException("No process definition found for name: " + string, ProcessDefinition.class);
}
Map<String, Object> cachedVariables = getAndClearCachedVariables();
cachedVariables.putAll(variables);
ProcessInstance instance = processEngine.getRuntimeService().startProcessInstanceById(definition.getId(), cachedVariables);
if(!instance.isEnded()) {