Hi,
I have list of files on UI which i want to download in zip folder.
What is the way out to implement this approach.
Kindly share me any code or any approach on this ?
Discussion posts and replies are publicly visible
Below plugin will help
https://community.appian.com/b/appmarket/posts/document-zipper
You can also have a look at - https://community.appian.com/b/appmarket/posts/add-documents-to-zip.
I'm not sure if this is what's causing your error, but you should be aware that the smart service expects you to provide the full document name as I mentioned before, which is the name + extension (so far your code just passes the name). For example,
document(fv!item, "name") & "." & "document(fv!item, "extension")
It might still work without the extensions, but your resulting zip file will end up with files without extensions which you probably don't want.
Other than this, all I can suggest is monitor a running instance and make sure your PVs have populated correctly - most importantly, pv!documents (should be either an array of document or an array of integer, the node will correctly typecast what it needs from either of these), and pv!documentPath (this needs to also be an array of course, at the very least containing the full name of each document in the array).
Hi Mike,
As i have shared my code in that i passing documents(array of doc id) and now i changed documentpath (array of name). But still java.lang.ArrayIndexOutOfBoundsException: 0
But if i change documents value to same as documentpath then i get java.lang.NullPointerException: Null Arguments are Invalid
It means documents(array of doc id) is correct format i feel so as per exception.
Why this ArrayIndexOutOfBoundsException this coming ?
I'm not sure what the source of that error is - the only thing I can suggest is to verify that your inputs are being entered correctly and correctly populated within the process instance. Can you post a screenshot of the values of "documents" and "documentPath" from within a process instance? It sounds almost as if one of the required values for the node is actually set as something invalid within the process instance (such as 0, or an empty set).
documents:-1245;1232;4567
documentPath:-test-sample.csv.2014-06-13; test-sample.csv.2014-06-25; test-sample.csv.2014-06-13;
Exact these values are going to PM.
I can't tell for sure until you post a screenshot, but it looks as if your "documentPath" array has a null entry at the end there. I expect that might cause unexpected issues when you feed the arrays into the zip file node, as it expects 2 arrays of the same length (and the document path values would never be null).
There is no null entry in this. I have verified with count() function . I have simply printed on my interface in text field. Even i have used reject function also to remove null n blank entires. So i am sure on that part.
Please provide a screnshot of this when you can, as there's not much more I can think of to troubleshoot without it. For example, here's mine:
you were absolutely correct.
But dono how its possible.
I think you need to go back to the expression you're using to pull your doc IDs and troubleshoot more. Perhaps comment out the startProcess() call temporarily and just write the docIds and docNames into local variables which you then display in a debug field on your interface.
If you see the code. It is returning values but i feel so type is not type of Document that's why in PM its coming null values.Otherwise on interface in textField its is returning list of id's.Anyways i got the pointer to more trouble shoot this. Thanks for pushing your inputs in this issue.