Washington DC Endpoint Management User Group

 View Only
  • 1.  Only start if no other process are running

    Posted Apr 09, 2013 04:58 PM

    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?



  • 2.  RE: Only start if no other process are running
    Best Answer

    Posted May 13, 2013 03:18 PM

    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.