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.


2 Answers 2


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)

  • 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, 2012 at 20:10

The "canceled" status isn't related to "ystem Account vs WF".

I would recommend you to check sharepoint logs... there you will be able to check the detailed error message. Without log messages is difficult to imagine what is happening.

EDIT: The default log path: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS

If you have more than one server (depending on your topology), this issue should be in Application Server's log. The WFE servers probably will not log anything related to this WFs error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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