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

Question

Question

Workflow check for instances of itself

asked on March 14, 2018

Hi,

I have a Workflow that runs as a scheduled workflow and I have the option to run the workflow as a business process. The business process is used only to expedite the workflow quickly rather than waiting for the hourly schedule. What I don't want is a user running the business process if the scheduled version is running. 

Is there a way in workflow to find out how many instances of itself (workflow) are currently running, this way I could terminate the business process if a scheduled version is running.

Any ideas greatfully accepted..

Thanks

 

0 0

Replies

replied on March 15, 2018

You might take a look at running your workflow in Single Instance Mode. I don't remember if it applies to workflows started as a BP.

0 0
replied on May 4, 2018

Hi Devin

Thanks for the reply sorry for my delay, unfortunately it looks like Single Instance Mode is for Scheduled workflows only, I assume to stop them colliding with each other if the first instance happens to hang.

Didn't know that the functionality existed so could be handy for future projects. Cheers .

0 0
replied on March 15, 2018

You can pick a folder (does not really matter what one) and a field (again does not matter what field).

At the top of the workflow, retrieve the field value from that folder.  If it is blank, put a value into the field, then run your process, and finally remove the value from the field.  If the field is not empty, you assume the workflow is running so your workflow ends.

You do have to keep in mind that if the workflow crashes (ends without clearing the field, you will manually have to clear it before it will process again.

 

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

Sign in to reply to this post.