cancel
Showing results for 
Search instead for 
Did you mean: 

Log User who made specific actions (create new DB tables)

rsleite
Champ in-the-making
Champ in-the-making
Hello,

This is the first time I am working with Activiti API and I am learning and enjoying it a lot, however the customer asked for a feature that I couldn't find a specific solution on Activiti documentation.

The customer wants to know the user who has: uploaded a new workflow, started a new process, suspended a process, and processed a user-task. This "who" is the user that is logged in the application and I am getting it from Spring, but I couldn't find a way to store this information in Activiti DB for these actions.

After some investigation, I realize, by analysing the data base structure and Activiti documentation that it seems that Activiti doesn't give a support to do it, so my plan would be to create some new tables in the data base to deal with that.

Have you ever had to store the user how performed these actions or have you ever had to create new tables/Java classes that work together with existing Activiti DB structure?


Kind regards
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi,

The user that started the process instance and completed the user task is stored in the Activiti database. You can use the IdentityService setAuthenticatedUserId method to set the user before calling the start process instance and complete user task methods. For uploading a new workflow and suspending a process instance we don't store the user currently. You could add a custom table that inserts the user after the action has been completed successfully in Activiti.

Best regards,