ProcessInstance processInstance = engine.getRuntimeService().getProcessInstance(processInstanceId);
String processName = processInstance.getProcessDefinition().getName();
try{
TaskQuery tq = engine.getTaskService().createTaskQuery();
IdentityService identityService = engine.getIdentityService();
tq.processInstanceId(processInstanceId);
tq.taskIsEnd().orderByEndTime().asc();
List<TaskInstance> instances = tq.list();
List<Map<String,Object>> instanceMaps = new ArrayList<Map<String,Object>>();
for(TaskInstance tmp:instances){
Map<String,Object> instanceMap = tmp.getPersistentState();