cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Best way to aumatically restart workflows when errored out?

Hi All,

I need some advice on this. So we have couple of list\library workflows. Now because of different reasons, these workflows sometimes errors out and get stuck unless I go and terminate the existing instance and restart it manually. I want something to keep an eye on these workflows at regular intervals and if they error-ed out, it terminates the existing instance and start the new one.

For this, I have 2 solutions in my mind, one does not looks to be fulfilling this requirement completely and other might start impacting performance over the time so need your comments\inputs. Please help decide or share any new ideas that you have.

  1. Create another workflow in the same list or library and have it trigger when items get modified which then check the status codes of other workflow and if it see the workflow error-ed out, it terminates the existing instance and start the new instance. To my point that I mentioned earlier about option 1 not fulfilling the requirement is that the list\document library don't gets modified frequently so triggering this workflow is a problem.
  2. Create a site workflow to start the list or library workflow which runs at regular intervals and if it sees any workflow error-ed out, it terminates the existing instance and start the new one. I have following concerns\doubt with this approach:
    1. Running this workflow at regular intervals and querying different lists with large amount of data may impact the performance over time.
    2. I am assuming using the web service, it would be possible to query the list\library for failed workflow instances and then terminate the existing instance and start the new instance.

I am on SharePoint 2010 and Nintex Workflow 2010 environment.

Appreciate your comments or inputs.

Thanks!

Labels: (2)
0 Kudos
Reply
5 Replies
Not applicable

Re: Best way to aumatically restart workflows when errored out?

Not getting any responses. Not even on my last thread. Just wondering if this scenario is one odd or am I not clear or not targeting the right forum? Can someone help me if I am not in the right place?

0 Kudos
Reply
Not applicable

Re: Best way to aumatically restart workflows when errored out?

Although I'm not technical, I wonder if you searched the community to see if there are responses to similar questions?  I found this:     And if that's related, it sounds like you are on the right track.

0 Kudos
Reply
Automation Master
Automation Master

Re: Best way to aumatically restart workflows when errored out?

This isn't a direct response but may assist when you have chosen your appropriate method to identify the errored workflows as it helps you cancel specified workflows.  Check out this code/article: https://community.nintex.com/docs/DOC-3936-terminate-old-instances-of-a-workflow?et=watches.email.do...

Do you have the enterprise version?  If so you'll be able to graphically identify errored workflows however that is a manual process.  Programatically I like the site workflow method but I'd be keen to see what others think.

Also I'm assuming you've run all the investigation you can (with Nintex support) to identify why that particular workflow fails on a semi regular basis?

Cheers,

Chris

Reply
Automation Master
Automation Master

Re: Best way to aumatically restart workflows when errored out?

I'd agree, that of the two methods above, the site workflow is the best option. You can write into the history list all the workflows that each daily instance of the workflow triggers so you can easily keep track of the workflows that have failed and been restarted, from one location.

But agree, there must be something fundamentally wrong with the workflow for it to fall over so regularly. Not a criticism, we've all been there, especially when scope creep demands more and more of what was originally requested from the app.

Reply
Not applicable

Re: Best way to aumatically restart workflows when errored out?

Thanks all for their inputs. I agree that the workflow may be better designed to address the issue but so far in different threads I have seen this problem being reported in context of overlapping issue and solution proposed was adding a delay. This is the same context  as mine but I don't want to go to delay route. We will definitely going to take a look and see what can be better designed to address the issue at first place instead of introducing something to restart workflows when they fail but for now, I will go this route as not sure if even that would help getting rid of this issue completely.

Thanks again!

Reply