日期:2014-05-20 浏览次数:20712 次
List<HistoryTask> list = jbpmTemplate.getHistoryService().createHistoryTaskQuery().list();
String assignee = null;
String insId = null;
String historyTaskId = null;
String comments = null;
Map<String, String> map = new HashMap<String, String>();
for(HistoryTask ht: list) {
insId = ht.getExecutionId();
//只取此流程实例的审批信息
if(insId.equals(instanceId)) {
assignee = ht.getAssignee();
historyTaskId = ht.getId();
List<HistoryComment> hList = jbpmTemplate.getTaskComments(historyTaskId);
if(null != hList && hList.size() > 0) {
comments = hList.get(0).getMessage();
map.put(assignee, comments);
}
}
}