Workflows are cancelled by system account

  • 20 January 2016
  • 15 replies
  • 555 views

Badge +3

Hi, guys!

Sometimes i meet with a strange trouble: workflows which have an action "Pause for" are sometimes getting cancelled by system account.

This happens randomly without any human factor.

When i open workflow log, i see:

Status:Cancelled

And action "Pause for" is highlighted by yellow color and marked as incomplete

What can be cause of this? From which part of farm i should start to investigate that trouble?


15 replies

Userlevel 7
Badge +17

Sounds familiar, what was the account that published the workflow?

Badge +11

Could it have timed out?

Badge +7

Hi ALex,

One of our customers had a similar issue, depending on its SharePoint build version.

Do you have the same behavior if you set a SharePoint Designer Workflow with a "Pause" in it?

Could you give us the current Build version on your SharePoint farm?

If you don't know how to get it, open a "SharePoint Powershell" windows and use the command line :

Get-SPFarm | Select BuildVersion

Userlevel 7
Badge +17

Pierre Fudala​ is headed in the right direction here. Depending on build and farm configuration, you could be setup with an App server that has the SP Foundation Workflow Timer service running separate from a WFE server. If you have this setup then workflows will always hydrate after pause on the App server with central admin installed on it and not on a WFE server and fail to actually continue because it has lost context with the User web context. More on it here Workflows not continuing - Timer Service and Delays

Badge +3

Hi! Thank you all for comments! I'll try to clarify all things

I have a SP 2013 foundation farm, 2-tier, with 2 WFE servers (in NLB-cluster), both have SP Workflow Timer Service running.

Cmdlet shows me 15.0.4569.1000 farm version.

I'll find that workflow was published by account of fired employee, this account was disabled. I republished workflow under active account now, will see if it helps.

Another strange issue with this type of errored workflow: some of them shows me an error when i try to see graphical workflow log: Cannot find history for workflow with instanceId 68c2e477-86ee-47e0-a3ab-f4a4790089d7. It may have been removed from the database.

It's a strange behavior, it is not "old" or orphaned workflow, and were started recently. Who can remove instance history.., don't know.

Badge +7

Hi,

This version number corresponds to the SP2013 SP1... which could be a buggy version...

Could you verify this? How to tell which Service Pack 1 you have installed on SharePoint 2013 - Todd Klindt's SharePoint Admin Blog

Userlevel 7
Badge +17

Workflows that are published by disabled accounts will have troubles and there are several context related properties to be formed around the workflow Owner.

Workflow history can be removed within the SharePoint lists by any user. It can be removed in the Nintex databases using options available in the site collection, central admin, as well as using console commands.

Badge +3

Hello, Pierre!

I verified, my SP1 is "good" SP ) I remember that installed "good" SP1 right after re-release.

Now double-checked servers with Gossner's script​, I have 15.0.4571.1502 version installed (although .buildversion shows me 15.0.4569.1000). So, it's not the case and i'll continue to check another advices in this post. Thank you!

Badge +4

hi andrew,

 Please i face the same problem,

i create site WF to get data from oracle to sharepoint using nintex ( Excute Sql , For each , Create item),

every this is ok , but when i start this WF Manually , its working for 5 min then giveing me

Workflow orclWF was canceled by System Account.

orclWF failed to start.

i dont know what i can do for this , can you help me?

Note : No Scheduled for this WF

Userlevel 7
Badge +17

When you start it manually, are you logged in as your personal domain account? You usually see this behavior when starting workflows manually using the Farm account.

Badge +4

yes i logged with my personal domain account ,,, i will try logged with

((Farm account)) and tell you result.

Badge +4

Unfortunately Same Error but this time i put (count)  for Collection to see how many record retreive from Oracle table  ,

its retreive all record from table , but the error appear when foreach begin work

Userlevel 5
Badge +14

does it fail at very first loop iteration?

how many records did it retrieve from DB resp. how many list item it caused/should cause to create?

how many items did it manage to create?

make sure your SP admin did not kill it or set some limits if you cause too big load on SP.

it would be much better if you created new question thread for your specific problem...

Badge +4

Hi @Marian Hatala

- Yes its fail at first loop iteration.

- Number of record must retreive 2619 row , the collection of Workflow (( i see that after create count for this collection just to check how many item in the collection)) retreive 2619 row , but after fail the list contain just  1300 row.

- Number of list item it caused = 9 item

- make sure your SP admin did not kill it or set some limits if you cause too big load on SP ??? how i can do this coz first error showing to me :

Workflow orclWF was canceled by System Account.

 

 

orclWF failed to start.

- Please i attach the Workflow image to you if you can check to understand me more.image-1image-2image-3image-4image-5 

Userlevel 5
Badge +14

it looks like you're creating too big batch that SP can not handle

try following:

- place wait for action at the very beginning of the workflow and set it to 5min

- make conditional commit pending changes within for each loop. start with commiting. after eg 100 processed items/iterations. if that goes well you can try to increase interval, if not try to decrease it. you will have to tune proper value that is suitable to your env.

one further hint for free happy.png

is there any specific reason why you perform two SQL queries? they are pretty simple and can be joined into single statements. that way you will read-in all the data from database out of forEach loop which will make it much faster.

Reply