Which column from Activiti db tables identifies that a User Task has cancelActivity=true

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

Which column from Activiti db tables identifies that a User Task has cancelActivity=true

Hi,

Can anybody help me find out Activiti table and column name, that can indicate that a User Task has attribute 'cancelActivity' true? Means a task is cancelled.

Is 'DELETE_REASON_' column (from table ACT_HI_TASKINST) value 'deleted' identifies that User task is cancelled?

Also have a look at this query, if somebody can answer this:

Boundary timer continues its execution even if attached User task is completed 

Thanks,

Ami Dave

5 Replies
Established Member II

Re: Which column from Activiti db tables identifies that a User Task has cancelActivity=true

In the 'ACT_HI_PROCINST' & the 'ACT_HI_TASKINST' tables, for processes and tasks respectively, there is a column "DELETE_REASON_" that noted in your comment. In that column is completed till the end, it'll simply say completed, if the task or process is cancelled, it will say Cancelled by <ID number of User>.

-JEarles

Active Member

Re: Which column from Activiti db tables identifies that a User Task has cancelActivity=true

Hi JEarles,

What I found in DELETE_REASON_ column, for my cancelled task is, 'deleted'.

I am bit confused whether value 'deleted' is put for any other operations

also or only when my task is Cancelled?

Kindly help me determining this.

Thanks,

Ami Dave

Established Member II

Re: Which column from Activiti db tables identifies that a User Task has cancelActivity=true

Hi Ami Dave ,

How are you 'cancelling' your task now? Are you using your own implementation to cancel task and expecting to see a 'cancelled' reason in Activiti tables? 

I don't think Activiti provides any API to cancel a task. Have a look at the docs here TaskService (Activiti - Engine 5.22.0 API) . You can do the following with Task

- Delete: delete but its record is still in history

- Complete: complete it 

- Delegate: delegates task to another user

- Unclaim: remove this task from current claimed user inbox and pass it back to the group

Would one of these available actions suit your need? What is your business use case regarding 'cancelling'? Is completing the task and set a process variable for reason work for you?

Thanks,

Thong Huynh

 

Active Member

Re: Which column from Activiti db tables identifies that a User Task has cancelActivity=true

Hi Thong,

Thanks a lot for responding back.

Kindly refer the comment above by Jonathan Earles, what he has written is: If by any means User Task is cancelled, the DELETE_REASON_ column would have value 'cancelled...' but actually in my case, it has value : 'deleted'.

Lemme tell you steps by which we mark a User Task cancelled:

1. If I have configured a Boundary timer (attached User Task) with value of property 'timerCycles' is '1'

2. When boundary timer is hit, we simple change the value of property 'cancelActivity' (It is User task's property) to true from false using our logic, which marks the User task cancelled and we get to see User task is finished. and the ACT_HI_TASKINST table's column : "DELETE_REASON_" has value ''deleted'.

So my concern is, is Jonathan right? Shall I consider 'cancelled' or 'delete' as a value to that column when User task is cancelled?

Thanks,

Ami Dave

Intermediate

Re: Which column from Activiti db tables identifies that a User Task has cancelActivity=true

Ami,

getting back to your original question.

There is no column in the database that represents cancelActivity. This is part of the BPMN definition and is stoed in the process definition itself.

The DELETE_REASON column you are referring to in other posts is populated on completion of a process or task that is used AFTER the task or process instance has been cancelled/terminated.

Again, there is no column that equates to cancelActivity in the process definition.

Greg