cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Assignments History

mbuzila
Champ in-the-making
Champ in-the-making
Hello,
I'm trying to use activiti's history as an audit storage for the changes in the Process Instances/Task. I currently have the history level set to full and I have the process instance, task and variable changes. However I'm missing the  Assignee changes. I believe this will be logged by org.activiti.engine.impl.history. HistoricDetailAssignmentEntity, right ? And it needs to be hooked in the assignee update logic.
Do you have an ETA for these implementations ?
Thank you very much.
Mihai Buzila
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Hi,

That feature is currently not planned for any upcoming release. As a workaround, you could use a variable and store the assignee in. When you set the historyLevel to full, the HistoricVariableUpdates will be available for the task.

You can hook up a TaskListener to your task, which is called when the assignee is changed:
<userTask id="task1" name="My task" >
  <extensionElements>
    <activiti:taskListener event="assignment" class="org.activiti.HistoryAssignmentHandler" />
  </extensionElements>
</userTask>

public class HistoryAssignmentHandler implements TaskListener {

  public void notify(DelegateTask delegateTask) {
   delegateTask.setVariableLocal("assigneeHistory",delegateTask.getAssignee());
  }
}