List<Map<String, Object>> resultMaps = new ArrayList<Map<String,Object>>();
ProcessEngine processEngine = getProcessEngine(userId);
if(processEngine != null){
ModelService modelService = processEngine.getModelService();
ProcessDefinitionQuery processDefinitionQuery = modelService.createProcessDefinitionQuery();
processDefinitionQuery.processDefinitionKey(processKey);
processDefinitionQuery.orderByProcessDefinitionVersion().desc();
List<ProcessDefinitionBehavior> processDefinitionBehaviors = processDefinitionQuery.list();
for(ProcessDefinitionBehavior processDefinitionBehavior :processDefinitionBehaviors){
resultMaps.add(processDefinitionBehavior.getPersistentState());
}