Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Only start if no other process are running

Created: 09 Apr 2013 • Updated: 16 May 2013 | 1 comment
This issue has been solved. See solution.

I have a workflow that runs every few hours to do a data sync with an outside service. Every now and then it takes longer to finish a sync before the next cycle starts. I know I could just change the frequency longer but I would like to make it smarter so only one process is running at a time. Is there a way to do this?

Operating Systems:

Comments 1 CommentJump to latest comment

reecardo's picture

You could use a Get Value/Store Value component (under Input Output - Persistent Storage) to "persist" the state of the workflow.

At the beginning of the flow, use a Get Value to get a state value and read it to determine if "running". If "running", abort; if "done", continue with the flow, but set the value to "running". At the end of the flow, set the value back to "done". Also set to "done" if any exception paths are encountered :)  If your flow is tunning on a schedule, sticking this logic in a Configurable Auto Start component is the way to go.

Probably better ways to do this, but outside of using a database or raiding task lists, this is a quick and easy way.

SOLUTION