Publicado Fri, 06 Sep 2019 13:30:57 GMT por Joe Kaufman Manager
Hey all,

I am trying to upload a document to a document tray via the Platform SDK. We have been uploading documents to file cabinets for a couple years now, no problems. That works in both C# and Visual FoxPro.

According to the examples here:

https://developer.docuware.com/dotNet_CodeExamples/57da87ed-111c-4f78-96e9-75d3b9462ce9.html

namely, the UploadSingleFileToBasket() method, a document tray is treated like a file cabinet, and an upload works the same way. You just don't bother indexing the uploaded document because it hasn't been stored yet.

So, I figured out how to get the GUID for the document tray itself (not the backing file cabinet), and I tried using that guid to upload a file. The call succeeds (no HTTP error) but the resulting response has the following process error in it:

   FileCabinet with id <guid> is not assigned to the user

The document is not in the document tray, either. The authenticated user has rights to the document tray I am using both explicitly and via Role. Yet it comes back saying it "is not assigned to the user". What does this mean?

The bottom line is that I want to upload a file to a document tray instead of a file cabinet. Why? Because I want to then clip the document to an existing document already stored in a file cabinet (like the way it can be done manually via the right-click "Clip" option in the web client. I don't want to do a full "merge" operation where two documents in a file cabinet are merged and then deleted. I want to simply clip a new document to an existing document. If there is a better way of doing that, I'm all ears. We have to have this working because we are about to receive thousands of documents from an external scanning vendor, and I need to upload the first volume of a document to a file cabinet and then clip additional volumes to the original. This needs to be automated, obviously.

Finally, I am wondering how people find the correct guid for a document tray? We name all of our document trays with a unique name, but that is not a requirement in DocuWare. You could have 800 trays, all named "Inbox", if you want. I just created three trays, all with the name "joek", all backed by the same file cabinet, and all with the exact same user permissions. There is literally no way to tell them apart, aside from each having a unique GUID. How would one automate uploads to various document trays (i.e. some sort of automated, centralized document distribution point) when there is no way to distinguish them uniquely? I guess we just have to be careful to name them distinctly?

Thanks for any help anyone can offer.

Thanks,
Joe Kaufman
Publicado Fri, 06 Sep 2019 15:51:27 GMT por Joe Kaufman Manager
Hey all,

I'd still appreciate any insight folks can give on my OP, but for now I have written a C# routine that is callable from FoxPro, and I can upload a document to a Document Tray successfully.

I think the issue for non-.NET tools is that the "Id" for document trays is very strange (discovered it from the .NET side). File cabinets have an Id equivalent to their Guids, but a document tray puts a "b_" in front of their Guid, resulting in an Id that does not meet Guid standards. If I try to manually add the "b_" in front and upload a document (from FoxPro), I get an error about the Guid being malformed.

Things work in .NET because there the FileCabinet type is used for these method calls -- can't do that with regular HTTP POSTs.

And my other questions remain. For example, how do I clip a document from a document tray to a document already stored in a file cabinet in .NET? I cannot find any examples except the "merge" and "transfer" examples. As I said before, I don't want to do a file cabinet-based merge because I don't want to have to store documents in a file cabinet just to clip them and delete them (plus it creates a whole new document instead of just clipping onto an existing one). "Transfer" examples do not appear to allow clipping, just movement.

I'd like to be able to emulate the "Clip" functionality from the right-click menu in the web client, just via the Platform SDK. Can anyone help? How are other people automating these clip processes?

Thanks,
Joe Kaufman

You must be signed in to post in this forum.