return t;
}
public BpmTask create(HistoryTaskInstanceImpl task, ProcessInstance pi)
{
MutableBpmTask t = new MutableBpmTask();
t.setProcessInstance(pi);
t.setAssignee(task.getHistoryTask().getAssignee());
UserData ud = ctx.getUserDataDAO().loadUserByLogin(task.getHistoryTask().getAssignee());
if (ud == null) {
ud = new UserData();
ud.setLogin(task.getHistoryTask().getAssignee());
}
t.setOwner(ud);
t.setTaskName(task.getActivityName());
t.setInternalTaskId(task.getHistoryTask().getId());
t.setExecutionId(task.getExecutionId());
t.setCreateDate(task.getStartTime());
t.setFinishDate(task.getEndTime());
t.setFinished(false);
return t;
}