Task Table id_ column max value

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

Task Table id_ column max value

What is the limit of taskid number for the activiti engine ?

is it always increasing or it will end at specific length and restart . I see its datatype as varchar(64) in the task table id_ column.

5 Replies
Highlighted
bassam_al-saror
Senior Member

Re: Task Table id_ column max value

The default id generator is Activiti/DbIdGenerator.java at 6.x · Activiti/Activiti · GitHub which uses id blocks until they are consumed. I guess it will reuse the old blocks when see Activiti/GetNextIdBlockCmd.java at 6.x · Activiti/Activiti · GitHub 

If you are concerned about the length of the id maybe you should consider using StrongUuidGenerator see Activiti User Guide 

venkatesh1987
Active Member

Re: Task Table id_ column max value

Bassam Al-Sarori‌ Thanks for the Response.

We are using Activiti Open Source 5.22 version.

In our case every time a task is created we are using it to link to the record in our application Database. So is there any chance that there might be repeatation of task id which is completed earlier.

For Example :

If you consider our applications records as R1 , R2 , R3.

R1 -- Task1, task2, Task4, Task6

R2- Task3,Task5,Task27

is there any chance that task1 completed in R1 can be repeated in future for Rn record?

bassam_al-saror
Senior Member

Re: Task Table id_ column max value

I assume by repeated you mean re-opened. No, a completed task can't be re-opened instead a new task can be created. 

venkatesh1987
Active Member

Re: Task Table id_ column max value

By repeated I mean , will the task id Number repeats ? Or is it always unique for the engine.

the reason we are asking is in our system we are having some data stored in tables with primary key as task id. This data will be there even if the task is completed.

If the task id Number repeats for some other task in future there will be conflict.

hope my question is clear this time .

thanks for the response.

bassam_al-saror
Senior Member

Re: Task Table id_ column max value

No the task id shouldn't repeat (unless you have very large number of tasks greater than Long.MAX_VALUE).