Unique constraint on process definition key

Hi,

I know there is a way to have a unique constraint on business key and process definition ID (https://docs.camunda.org/manual/7.5/user-guide/process-engine/database/), but this still allows for multiple instances with the same business key if there are multiple version of one process map. Is there a way to set a unique constraint on business key and process definition key?

Hi @dain3265,

I guess this is not so easy. The table ACT_RU_EXECUTION doesn’t have a column for the process definition key.

You could ensure the uniqueness by creating a new table. The table has the business key and the process definition key of the running instance. This table can have a unique constraint for both columns.

Best regards,
Philipp