Hi all,
I have a process model that calls an expression rule to generate a 6-character random alphanumeric string. I encountered a case where two instances of the process model were triggered at the same time (based on time logs), and both received the same generated value from the expression rule.
I understand that there's always a chance for it to generate the same value. However, I’d like to ask:
Is it possible that both process models used the same instance or execution thread of the expression rule, which might explain why the same value was returned?
Discussion posts and replies are publicly visible
6 characters isn't that much randomness. So, yes, this can happen.
What do you do with this value?
We’re using it as an identifier. Unfortunately, we can't add more characters due to an external system limitation.
OK, but then you can't just use a random value. You will get duplicates over time.
Did you consider to just use the primary key of a record as the identifier? This would guarantee uniqueness. And you can convert that number into an alphanumeric string if needed.