In self-hosted Workflow there is an option to enable a single instance mode for a workflow. This is really helpful for different situations, like when you need to auto increment a value from a database.
I have a situation in Forms where I have a lookup table that houses various number values. I need to look up the largest number and increment it by one. Then add the incremented value to the lookup table. I don't want the same number value in the table twice. The problem is that sometimes we have seen Workflow take a while to run on some instances and don't want the possibility for it to return, in different instances, the same incremented value because the value in the table wasn't updated yet. I'm looking for some solutions for this scenario.