Autogenerate incremental number


I want my cases to start at 10,000 and increment by one, how do I set the case to start at 10,001.

1 answer


instead of trying to manage case id, you could create a column called request id and data type long.
Now auto increment the request id each time a new case id created. You can set the first request id to 10000. Hence all other values will be incremented by 1 and you can use this request id to track your requests.
Also you may need to write a JPQL query to search the highest value for request id and then increment that output by one. You need to call this custom query every time a case is raised.


Submitted by pierrick.voulet on Fri, 10/12/2018 - 20:06

I agree and in other words, it is not a good practice to use a technical IDs managed by the Bonita Engine (such as a case IDs) like it is some kind of business data.