cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Workflow automatically re-starting instead of ending.

Hi,

I am using SharePoint 2010.  I have a site workflow which is scheduled to run every night.  It has started "misbehaving".  I cannot say it errors - because the strange behaviour that it exhibits is to run through the workflow - get to the end no errors and then pauses for a few minutes and starts again.

 

There is a pause for 1 min at the start of the workflow, but nothing at the end. 

I didn't (and still dont) understand what was happening so at the end of the workflow I have added a Log in history saying "should be end of workflow" immediately followed by an End Workflow action. I have added a Log in history as the first action - "starting workflow".

 

 When the workflow runs I can see the "starting workflow" in the log, and when it has completed the actions I can see the "should be end of workflow" message in the log - so I know it hits that action.  But the status of the workflow still says in progress, and after a few minutes the workflow starts at the beginning again with "starting workflow".  It is not starting another instance, it is the same workflow instance just going back to the beginning. 

 

I have run the workflow manually (i.e. not from a schedule) and it runs through with no errors - gets to the "should be end of workflow" message and then errors "Failed on Start (retrying)".

 

What should I look for/try now.  (I can terminate the workflow manually so it is not continually re-trying, but this makes the "automated" system more of a manual proces"

 

Thanks in advance

Catharine

 

Labels: (1)
0 Kudos
Reply
4 Replies
Highlighted
Automation Master
Automation Master

Re: Workflow automatically re-starting instead of ending.

@Catharine ....Are your actions inside a loop?

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow automatically re-starting instead of ending.

I originally thought there may be an issue with looping.  There are no Loops as such.

 

There are 3 For Each actions (not nested).  i.e. For Each1 and when that is finished For Each2 and when that is finished For Each3.  After For Each3, is the last Log in History.  I put that in place to make sure that the workflow came out of the For Each3.  i.e. "Should be end workflow" which is in the highlighted action below is written out to the log.

Workflow..JPG

0 Kudos
Reply
Highlighted
Nintex Employee
Nintex Employee

Re: Workflow automatically re-starting instead of ending.

Hi,

If the "end workflow"action is the last action in the workflow it is not required because the worklfow hits the end of the workflow and ends.

The reason for the "looping" is because you have more than one Nintex workflow Scheduler job installed in the environment.
You only need one job regardless of the number of web applications you have.

Run the two commands as per the linked article below.
Please type (do not copy and paste) these commands:

1.NWAdmin.exe -o UninstallTimerJob -job ScheduledWorkflows

(Use above line if it is currently installed on Central Admin Web App, if not specify what Web App to remove it from using -url switch)

Then:

2. NWAdmin.exe -o InstallTimerJob -job ScheduledWorkflows -url http://yourwebappurl/

The first command removes all jobs from the farm.
The second adds the job back in to ONE web application.

https://community.nintex.com/t5/Best-Practices/Scheduled-Workflows-and-the-Nintex-Workflow-Scheduler...

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Workflow automatically re-starting instead of ending.

Thank you for your reply.  

- I know that the End Workflow should not be needed - as the workflow should end.  But it doesn't, so I added the End Workflow to try and force it to end, and the End Workflow does not end the workflow either.  I have added a message to the common area of the End Workflow Action item - so that it should appear in the log history if it has fired.  But that never appears in the log.

 

- I have many other workflows which run and do not exhibit this symptom

- The same "strangeness" occurs whether I run this on a schedule or manually.

 

- I have looked at the link you attached. 

I have been to Central AdministrationMonitoring Timer Jobs Review job definitions and to me it looks as if there is only one instance of the Scheduler ?  (If there were more than one would I see an identical line item with a different web app ?)

instances.png

I have been to Central Administration System settings Manage servers in this farm I can see something called Nintex Live workflow service installed on the central admin server (and no other server).  I cannot see anything called Nintex Workflow Scheduler.  (I am assuming that the Nintex Live workflow service runs the Scheduler ?)

services.png

I have looked at the timer job status and it looks as if there is only one instance running ?

scheduler.JPG

 

0 Kudos
Reply