My client has a process where users submit requests (LF Forms) and they need an internal Request ID to manage these requests (like a ticket number for support request).
These requests are submitted through several business processes, each request get assigned with an internal Request ID.
Currently we use a table hosted by Laserfiche Cloud.
- Each time a new request is submitted, we retrieve the latest Request ID in the table
- We calculate the new Request ID (current Request ID + 1)
- We insert a new line with the new Request ID (and other data related to the submitted request).
My concern is that, from time to time, 2 requests are submitted at the same time, and got assigned with the exact same Request ID, which creates issues later in other processes.
I tried to find a solution that would prevent these duplicated ID from happening but I can not find one that works 100% and with a "useful" Request ID.
- This Request ID needs to stay basic (1, 2, 3, ...), so we can not use the instance ID generated by Laserfiche (such as ae89010c-9b4c-470d-b89f-ff5063995b23).
- I wanted to use the "_key" that exists in LF tables, but when rows are inserted, they don't contain a basic incremented integer (1, 2, 3...) but a random value (see column TEST_key)
- Any other solution I have in mind might result in having 2 workflows running at the exact same time and generating the same Request ID for 2 different requests (use the number of rows in the table, store the Request ID in a field on a dedicated document in the repository...)
Any idea/help would be really appreciated!