Service tasks are not persisted in ACT_HI_TASKINST

cancel
Showing results for 
Search instead for 
Did you mean: 
aminaiser
Active Member

Service tasks are not persisted in ACT_HI_TASKINST

Hello. i am using Activiti v 6. I have a lot of processes that consist of only service tasks. I want to see the variables of these tasks and the values of the variables. But the service tasks are saved only in ACT_HI_ACTINST table and contain null in the column called TASK_ID_. So for now it seems for to be impossible to retrieve variables for service tasks.

Maybe I have misconfigured something in my project? What can be done in my situation? 

P.S. I can retrieve variables ACT_RU_VARIABLE or ACT_HI_VARINST, but they are bound to the process instance, not task. But the variables values are updated at each step. Is it possible to get variables and their values for each service task of the process?

2 Replies
hernanw
Member II

Re: Service tasks are not persisted in ACT_HI_TASKINST

I have the exact same question. Which is the correct way to archieve this? Thanks.

afaust
Master

Re: Service tasks are not persisted in ACT_HI_TASKINST

Only user tasks are stored as "actual" tasks in the Activiti database. Service tasks are stateless tokens only used for invoking logic. They do not contain any variables of their own. Any variables they access are bound to the current execution, which can be either the process itself or some branch in the execution flow (introduced by gateways / boundary events). "Tasks" as far as the database storage is concerned, only refers to actual user tasks.