SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having a strange issue with a Visual Studio Sequential workflow. We're uploading files to SharePoint Document Library via Client Object Model using File.SaveBinaryDirect.

Error in log is as follows:

Failed to persist workflow instance: ... with error code: 5, instance data size: 25013, internal state: Locked, Running, NotStarted, processing id: ...

I've tried already to install CU, but still nothing better. Workflow doesn't wait for any time, it gets the status "Canceled" immediately and a message "canceled by system account" in workflow history.

But if I try to run the workflow manually, it starts with no problem. Also there is another workflow that used to be on the same list and that one started automatically just fine.

share|improve this question

Are you saving the file under a SPSecurity.RunWithElevatedPrivileges?

If true, it's a by design behavior of Workflows. Workflows does not start automatically when the process identity is the current user (which is the case when using SPSecurity.RunWithElevatedPrivileges)

share|improve this answer
Thank you for that info. Unfortunately that is not the case. The originator user is the user that uploaded the document. I'm also avoiding any of SPSecurity.RunWithElevatedPrivileges code. – Gomiunik Nov 20 '12 at 20:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.