cancel
Showing results for 
Search instead for 
Did you mean: 

Using same business key for multiple times

c_arunrathnakum
Champ in-the-making
Champ in-the-making
Hi all,

I m using activiti 5.11.

I m in a situation that I have to use the same business key for multiple processes such that only one of the process is active at a time.

The scenario is that, I pass the order id that is generated in my application to activiti's business key. The order management completion takes place outside my application, hence not in activiti.
So the process is completed after sending the order to the third party application.

Suppose if the order is failed, a new process is initiated manually and goes through the same flow again, with the same order id.


Can anyone help me on this.
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Hi Arun,

Since 5.15.1 the business key is not unique anymore, so that would cover your use case.
For Activiti 5.11 it must be unique.

Best regards,

Hi Tijs,

I cant migrate the version as this is in production.. Any alternative way?

trademak
Star Contributor
Star Contributor
Hi Arun,

I can understand it's not easy to migrate to the latest Activiti version. But with Activiti 5.11 there's a database constraint to prevent duplicate business keys and the API is also expecting one process instance for a business key. But a hack would be to remove the database constraint.

Best regards,