K2SPSList upload document error

  • 10 December 2007
  • 4 replies
  • 0 views

Badge +4

I needed to modify an InfoPath form for a process. I saved a copy of the form from K2 onto my local machine. I modified the form. I published the form and overwrote the old form. I then did a Refresh Document in K2 and exported the process.


The process now fails, returning an error on K2SPSList.UploadDocumentFromURL.


As usual the web service gives me a completely useless error message - "Cannot complete this action. Please try again."


Any ideas what has gone wrong and how to fix it?


 


4 replies

Badge +10

Is it failing just on submit?


Take a look at the code behind for the InfoPath client event you will see some values that need to be populated


'strWorkspaceName' and 'FileURL'


Then check the workspace for this process and see what values are there.


Or you may want to add some debug code such as console.writelines or the like to see what values are there, this may be where the process goes south since it does not have enough informtion to perform the action.

Badge +4
Thanks for the reply Chris, but don't think these are the problems. The process never reaches the submit event - it first takes a copy of the form from a template and tries to upload this to the document library. Its here that the upload event is causing an error. The FileURL and WorkspaceName are correct, and the form looks correct in the Byte[] its trying to upload. Everything in the web service call looks fine, but its just not working. As there is no real documentation on the K2SPSList I was hoping someone could provide a lost of possible errors that result in this error message being returned.
Badge +4
I have fixed the problem by resetting the K2 server. Still no idea what causes the error to begin with though, very odd.
Badge +3

Hi,


I have picked up the application from etp when he left the company and we are now experiencing a similar problem. Everything appears correct but we are printing the error message on the console and this is telling us "Value does not fall within the expected range".


Is there any way you could provide a list of reasons that the upload might fail, or, even better, the source code for the moethod so I could look for myself.


Any help much appreciated.


M

Reply