SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

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

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.

share|improve this answer

Your Answer

 
discard

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.