cancel
Showing results for 
Search instead for 
Did you mean: 

Business keys & external reference IDs

rkroll
Champ in-the-making
Champ in-the-making
It appears that the intent of Activiti's "business key" is that of an external ID for a given process instance.  This works well in the case where you need to uniquely identify a process instance without needing to know its internal ID.  The current functionality is that of an external reference ID and not as what most users think of as a business key.  We are currently using process variables to store a business key for our domain with a processes - this allows us to identify all processes associated with a given key.  This breaks down when we need to query all historic processes for a given key (which is in a process variable).  Take this use case for example - We wish to store the VIN number of a  car as the business key, but since you cannot run two processes with the same business key, we store the VIN as a process variable.  After we start multiple processes (repair, cleaning, etc.), we need to see a list of all processes associated with a given VIN.  This seems like a typical use case for storing a business key with a process instance.  Is it possible that we extend the process instance to include an "external reference id" which could be used in queries (historic or otherwise)?
11 REPLIES 11

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
What I tried once was to use 'composite' businesskeys'. I used a postfix and mades sure I could retrieve the process instances based on 'like' queries with a goooooood index. This worked and I think that is what a business key could be.

Another solution is to do the reverse and store the process instance id with your domain data.

Both work with the advantage that the second does not need changes in Activiti.

rkroll
Champ in-the-making
Champ in-the-making
Storing the instance with our domain data was the workaround I was planning, but it just seems like it would be easy to implement on the Activiti side.  Adding an external ref column would be easily indexable and would allow for storage of whatever key the user wished to store.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Or ditch the uniqueness constraint on businesskey…. That woul be my preference instead of adding a kind of but not 100% similar 'thing'

rkroll
Champ in-the-making
Champ in-the-making
Do you know what the impact would be to removing the unique constraint on businesskey?  That would solve all of our current problems.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Do you know what the impact would be to removing the unique constraint on businesskey?  That would solve all of our current problems.

Not much I think if you are aware of the fact that it is none unique.

heymjo
Champ on-the-rise
Champ on-the-rise
Do you know what the impact would be to removing the unique constraint on businesskey? That would solve all of our current problems.

It seems indeed not logical not being able to start the same process multiple times for a given business key or entity, this has bothered us as well in the past.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Maybe not in your business, but in the insurance business it is not uncommon

heymjo
Champ on-the-rise
Champ on-the-rise
Maybe not in your business, but in the insurance business it is not uncommon

indeed, it totally depends on the business process. That's why i think this constraint should not be enforced by Activiti.

PS do something about the forums spam !

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
PS do something about the forums spam !

I have no rights to do that… 😞 Not sure if they cracked the captcha or if real humans do this…
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.