You are viewing limited content. For full access, please sign in.

Question

Question

Keep a variable open to all workflows?

asked on January 30, 2014

 I want to create a variable that can be incremented each time a work flow referencing it is run. Is this possible?

0 0

Answer

SELECTED ANSWER
replied on January 30, 2014

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.

0 0

Replies

replied on January 30, 2014

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.

0 0
replied on January 30, 2014

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

0 0
replied on January 30, 2014

Thanks guys, I did the database solution, not necessarily what I would have wanted but will do the same job. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.