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

scheduled site work flow errored - or ???

Jump to solution

 

Hi,

 

 

 

I’ve scheduled a site workflow. The workflow works if I start it manually. But once I set up a schedule for the workflow, it will notify by mail that the workflow failed to start and that it will retry later on.

 

 

The strange thing is, that even though it get the message that the workflow errored, I can see that the workflow is actually run ?!? The workflow runs through a list of items and for each item it checks if a Boolean is true or false. Based on the result an email is send out. So despite the fact that I receive a workflow error, the workflow is somehow executed.

 

 

Any idea what could cause this error?

 

Thanks!

 

Labels: (1)
Reply
18 Replies
james_tyzack
Nintex Newbie

Re: scheduled site work flow errored - or ???

Jump to solution

Hi Henrik

If you view the workflow history for the scheduled site workflow instance, is there a message indicating that the workflow failed in the messages section? Please let me know if there is any error information there.

regards

James

0 Kudos
Reply
Highlighted
Not applicable

Re: scheduled site work flow errored - or ???

Jump to solution

Hi James

Here a few more details.

The workflow was scheduled to run at 02.15 PM. At that time I received an email with the subject "Workflow Schedule Failed". In the mail I can click to view the schedule or click to view the workflow status page.

If I view the workflow status page I get an overview where it says

Date Occurred : 25.08.2014 14:15

Event type: Error

User ID: System Account

Description: Asset Loan Reminder Failed to Start

Outcome: [blank - no text here]
At 02.16 PM I got an e-mail with the subject "Workflow errored"
I can click to see the workflow status. If I do that and click "Click here to show detailed view" I basically get the same information as listed above. The only other information I get here is that each action in the workflow had a duration of 0 minutes.
At 02.21 PM I get another mail with the subject "Workflow errored". Same content as described above.
At 02.21 PM I get a mail from the workflow !!! This mail is send as part of the actions in the workflow that I've made. So despite the fact that the workflow errors - it looks like the workflow was executed anyway ?!?
At 02.26 PM the hole thing loops again. So here I'll receive another "Workflow errored" message and a mail from my workflow.
At 02.31 PM one more loop
At 02.36 PM one more loop
At 02.41 PM one more loop
And so it continues every 5 minutes until I kill the schedule.
So - the workflow history do not provide any more information.
0 Kudos
Reply
Automation Master
Automation Master

Re: scheduled site work flow errored - or ???

Jump to solution

So it sounds like something, or single action within the workflow is causing the fail. If you are seeing it actually run then fail then the quickest thing to check is to add several Log to History List actions. Add "Got to {Action name here}" so you can track the progress. Also, put any relevant variable values in the log action to test their values. Maybe this can show the point of failure and the values at that point.

When you view the Workflow Status, do you see the preview of the workflow? The designer looking view of the actions, where green actions ran successfully and yellow is the incomplete actions? That can show which action it was stuck on too.

0 Kudos
Reply
james_tyzack
Nintex Newbie

Re: scheduled site work flow errored - or ???

Jump to solution

I'm going to take a different approach to Andrew.

The "Failed to start" message indicates to me that the scheduled attempted to start, something went wrong and it was put in a retry queue, and then a few minutes later was picked up and started successfully. There will be an error in the SharePoint log at the time the schedule attempted to run, but in this case I'll start with a 'best guess' to the issue.

First thing to try:

1) Have your administrator log into Central Administration

2) Nintex Workflow Management section

3) Web Application Activation link

4) Change the web application to the Central Administration web application

5) Press activate

And try the schedules again and let us know.

James

0 Kudos
Reply
Not applicable

Re: scheduled site work flow errored - or ???

Jump to solution

The strange thing here is that the workflow is running without any errors if I run it automatically. But once it's scheduled I get an error.

So I don't thing that the workflow itself is the problem. Why should it run manually but not when scheduled?

Also when I build the workflow I did exactly what you are suggesting. I had a notification mail send for each action, and I can see it goes all the way through the workflow.

0 Kudos
Reply
Not applicable

Re: scheduled site work flow errored - or ???

Jump to solution

Thanks for the suggestion.

I have admin rights myself, so I did the suggested changes - but no cigar !

I was googling the error some day ago, and I found a page suggesting that running a workflow as a system account could cause problems. I can't find the page again so if any of you know what that is about - I'll be happy to do some testing.

But - is there a way to change which account that will run the workflow when scheduled rather than run manually?

/Henrik

0 Kudos
Reply
james_tyzack
Nintex Newbie

Re: scheduled site work flow errored - or ???

Jump to solution

Ok, next thing I want to you to try.

 

 

For SharePoint 2010:

 

 

 

1) Log in to the Central Administration server

 

 

 

2) Open a command prompt and change directory to c:\program files\Nintex\Nintex workflow 2010

 

 

 

3) Run command: NWAdmin.exe -o UninstallTimerJob -job ScheduledWorkflows

 

 

 

4) Run command, providing a real web application URL: NWAdmin.exe -o InstallTimerJob -job ScheduledWorkflows -url https://awebapplicationurl

 

 

 

5) Test scheduled workflow again

 

 

 

For 2013 it’s the same except for the location of NWAdmin. In 2013, you can access it direct from the SharePoint Management console.

 

 

 

What we are doing is detaching the schedule job from Central Administration and reattaching it to a content web application. In some configurations, workflows can have trouble running in Central Admin, but that is where our scheduled job installs by default. Switching to it to be associated with a content web application should solve your issue.

 

 

 

Please try the above steps and let us know

 

 

 

Regards

 

James

0 Kudos
Reply
james_tyzack
Nintex Newbie

Re: scheduled site work flow errored - or ???

Jump to solution


Regarding the system account question - the main issue is if the system account creates an item in a list, workflows set to automatically start will not do so.

Workflows running in the schedule will run as the user who created the schedule.

0 Kudos
Reply
Automation Master
Automation Master

Re: scheduled site work flow errored - or ???

Jump to solution

SharePoint Workflows will create a user context around them, such as the initiator, but if that user is not an actual user like the System Account, then it will have trouble handling some actions, but not all. So it is generally not a good practice to start workflows or publish workflows as System Account. Also, it is not a best practice in SharePoint to log in as the System or Farm account to create content. Is it possible to publish the workflow as a non System Account and also schedule it as another user?

0 Kudos
Reply