cancel
Showing results for 
Search instead for 
Did you mean: 

Saving service tasks to database

egrabowska
Champ in-the-making
Champ in-the-making
Hi,

I'm using Activiti engine to create application for automation and monitoring of some specific processes. Most of the tasks within these processes don't require any interaction with the user so I'm using <serviceTask> tag to define them and then link with proper Java implementation.

Ability to browse history of past process instances is crucial feature of this system. I have FULL history level set. Unfortunately I've noticed that only user tasks get persisted in act_hi_taskinst table. Why is that? Is there any simple way to persist also information about my service tasks? Is it against concepts standing behind Activiti?
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Have a look on the following example:
org.activiti.standalone.history.FullHistoryTest#testVariableUpdates
in the activiti source.

Regards
Martin

egrabowska
Champ in-the-making
Champ in-the-making
Thank you for your answer, I've already noticed that service tasks are saved into another table. Maybe you should consider adding more detailed description of database schema to your documentation. Tests code isnt usually the first place to look for specs.

jbarrez
Star Contributor
Star Contributor
We always accept pull requests if you think you can improve something, even in the docs.

There are two tables: ACT_HI_TASKINST and ACT_HI_ACTINST. The Java Api's also abstract this and give you easy ways to retrieve those.