We want to be able to create a form and after submission, the Instance ID starts at 1 and maybe set a number range specific to that form.
Question
Question
Replies
That is not possible because the Instance Id is a global identifier for the instance table meaning it increments for all processes in Forms.
If you want an independent counter for that specific process, then you'll probably need to create an external data table and track/generate it yourself.
You could do that by creating a simple SQL table with an Identity column, maybe store the BP Instance Id to "connect the dots" between the Forms BP Instance Id and your sequential ID, and add columns for any other data you find useful, then run a workflow right after each submission.
In the workflow, use an insert data activity to add the record to your table and check the box to generate the identity token, then use Set Business Process Variables to pass that back to your bp instance.
However, it does sound like a useful feature request (i.e., adding a new identifier that is independently sequenced for each business process).
You can also use the repository itself as a place to store the identifier, in a number template field assigned to a blank entry.
Workflow has an activity to ensure only 1 instance is running at any given time as well, so that a queue will be created if multiple calls come in simultaneously.
If you're referring to Simple Synchronization, that has a pretty substantial impact on performance so I've avoided it at all costs.
EDITED: I thought you were referring to Single Instance Mode, which cancels instances, but I realized you probably meant the Synchronization activity which does not.
Oh it cancels the workflow? That is not good, I thought you could have them run one after the other.
My mistake, I thought you meant Single Instance Mode, which does cancel, but when I noticed that you said "activity" I realized you probably meant the Synchronization Sequence, which does act more like a queue.
Oh I think that is it, I have not used it yet but remember learning that its in there.