[jbpm-dev] [jBPM Development] - Re: jBPM4 History/Log implementation.

rams.rapo do-not-reply at jboss.com
Wed Nov 18 00:57:53 EST 2009


Hi,

I noticed that whenever fields like duedate on a task are changed, the dbversion column gets incremented. However there's no entry in history detail table to see old and new values. 


Also in history task impl class we may be losing reference to detail before persisting it. 


  | 
  |   public void updated(TaskImpl task) {
  |     if ( (assignee==null && task.getAssignee()!=null)
  |          || (assignee!=null) && (!assignee.equals(task.getAssignee()))
  |        ) {
  |       addDetail(new HistoryTaskAssignmentImpl(assignee, task.getAssignee()));
  |       this.assignee = task.getAssignee();
  |     }
  |     if (priority!=task.getPriority()) {
  |       addDetail(new HistoryPriorityUpdateImpl(priority, task.getPriority()));
  |       this.priority = task.getPriority();
  |     }
  |     if ( (duedate==null && task.getDuedate()!=null)
  |          || (duedate!=null) && (!duedate.equals(task.getDuedate()))
  |        ) {
  |       addDetail(new HistoryTaskDuedateUpdateImpl(duedate, task.getDuedate()));
  |       this.duedate = task.getDuedate();
  |     }
  |   }
  | 
  |   // details //////////////////////////////////////////////////////////////////
  |   
  | 
  | public void addDetail(HistoryDetailImpl detail) {
  |     detail.setHistoryTask(this, nextDetailIndex);
  |     nextDetailIndex++;
  |   }
  | 
  | 

Env:

  | jbpm 4.0
  | jboss 5.1.0
  | Oracle 10g
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266210#4266210

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266210


More information about the jbpm-dev mailing list