cancel
Showing results for 
Search instead for 
Did you mean: 

Audit trail implementation in Activiti 5.17.0.2

activititester
Champ in-the-making
Champ in-the-making
Hi,
I would like to implement the audit trail implementation for the task, Process instance, process definition etc. Basically capture who did the change and whats the old and new value for the updates, if user task is claimed by a user, it has to be persisted in the history tables and show as trail that someone claimed a task and then someone unclaimed it and the full trace of it.

Even, setting the history level to full, does not achieve this result.  Any recommendations for this?
7 REPLIES 7

trademak
Star Contributor
Star Contributor
You can create a listener to the task events and insert the required info in your own custom table.

http://activiti.org/userguide/index.html#advanced.event.logging

Another way would to add task listeners to the user task in BPMN XML and implement the logic to write to a custom table there.

Best  regards,

Thanks for the very quick reply. Another scenario for me, is that when a user updates the process itself , can I apply the options given above to capture the audit trail meaning the version before and after the update.

Thanks for the support. I would like to the capture the process definition, which user(who) updated the process definition, the increase in the process definition version etc. For eg: if I have deployed a process definition, I would want to capture that I did deployed this process definition yesterday , and the version is 1 and if I updated that process definition today, I would like to capture that I updated the process definition today and the updated version is 2.

jbarrez
Star Contributor
Star Contributor
> " user updates the process itself "

You mean deploying a new version? What do yoiu want to capture? The deployment? Or simply include process definition info in the event (the process definition id is unique and should be part of the event already)

Thanks for the support. I would like to the capture the process definition, which user(who) updated the process definition, the increase in the process definition version etc. For eg: if I have deployed a process definition, I would want to capture that I did deployed this process definition yesterday , and the version is 1 and if I updated that process definition today, I would like to capture that I updated the process definition today and the updated version is 2.

trademak
Star Contributor
Star Contributor
You can listen to the ENTITY_CREATED event and check for the Deployment entity. This event is thrown for every new deployment.

Best regards,

Thanks for the timely help and support