I want to create a variable that can be incremented each time a work flow referencing it is run. Is this possible?
Question
Question
Answer
As Chad suggested, I would store the variable in a SQL table and have Workflow interact with it using the Query Data and Update Data activities.
Replies
You might want to use a database table. You can read / update the database like a global variable. For faster performance you could use a field on a shared entry in the repository but one workflow might lock it while another tries to update it.
Alternatively, you can create a database table and a small web service that is internal to your server machine that you can send a request to and it returns you the number and then increments the number in the Database.
Could even include the workflow instance ID in the request to the web service so it only increments on a new instance ID and not on the same workflow requesting the number
Thanks guys, I did the database solution, not necessarily what I would have wanted but will do the same job.