this.drawHistoryFlow(image, processInstanceId);
for (HistoricActivityInstance historicActivityInstance : activityInstances) {
String historicActivityId = historicActivityInstance
.getActivityId();
ActivityImpl activity = definition.findActivity(historicActivityId);
if (activity != null) {
if (historicActivityInstance.getEndTime() == null) {
// 节点正在运行中
signRunningNode(image, activity.getX() - this.minX,
activity.getY() - this.minY, activity.getWidth(),
activity.getHeight(),
historicActivityInstance.getActivityType());
} else {
String deleteReason = null;
if (historicActivityInstance.getTaskId() != null) {
deleteReason = Context
.getCommandContext()
.getHistoricTaskInstanceEntityManager()
.findHistoricTaskInstanceById(
historicActivityInstance.getTaskId())
.getDeleteReason();
}
// 节点已经结束
if ("跳过".equals(deleteReason)) {
signSkipNode(image, activity.getX() - this.minX,
activity.getY() - this.minY,
activity.getWidth(), activity.getHeight(),
historicActivityInstance.getActivityType());
} else {
signHistoryNode(image, activity.getX() - this.minX,
activity.getY() - this.minY,
activity.getWidth(), activity.getHeight(),
historicActivityInstance.getActivityType());
}
}
}
}