Hello,
I have an interface which uses a record grid to display a document repository. My documents are stored in SharePoint but the record data contains the SharePoint File IDs, file names and other metadata (the documents are not stored on Appian as there will be hundreds of thousands of documents to store).From this Interface, I want to give the user the ability to view and download documents. In order to do this, I have gone down the route of using an a!startProcess when clicking on a button.
In this process, I am running a loop which iterates through the selected documents, brings the document back from SharePoint, and zips the document together. In the onSuccess parameter of the a!startProcess smart service, I pass the zipped document back to the interface. from there, the user can use a downloadDocument link to download the zip file.
The issue I am facing is that in order for the zipped document to be brought back, I must activity chain my process, and when downloading more than a certain number of files, it will break the 50 node limit.
Does anyone have any suggestions?
Thank you.
Discussion posts and replies are publicly visible
Any reason you can't add a separate task that gets assigned to the launching user after all the file processing is completed? Using the trick where you pass the assembled document back to the original interface is good and all, but it does have reasonable limits which it sounds like you're hitting now.
Our current application does not make use of tasks and we do not wish to start doing so. From what I can tell, it seems like the SharePoint integration to download a document can only handle one document at a time. I initially thought about going around this this by using an expression rule but this does not seem to work as I cannot seem to call the integration from an expression rule.Is there a way to download multiple documents from SharePoint on Appian using a single integration/a single node within a process?
louisg5816 said:Is there a way to download multiple documents from SharePoint
I'm unclear, i haven't gotten a chance yet to get my hands into Sharepoint integrations sadly.
In case you're still desperate to do this on the original task - it gets a bit more tricky but should be doable, provided you're OK with some extra clicks. What you can do here is build a custom process report that adds the final generated zipped document ID as a data column. When calling the initial process, pass back not only the zip file ID (for times when chaining is allowed to complete) but also the process instance ID, to a new local variable. When you get a process ID but no zip file ID, show the user a "refresh" button / icon of some sort - pressing this can run a Query Process Analytics call on the report given the process instance ID, and when the zip is done being generated, you can pass its value into the desired local variable (at which point you switch over to the "here's your downloadable document" configuration you already have).
I see, I have very limited experience with reports. How would this option integrate within a given interface?
louisg5816 said:How would this option integrate within a given interface?
You can call a!queryProcessAnalytics() from any user-interactable component on an interface, like the saveInto of a button or link. QPA consumes a reference to the report in question (you'd create the process report then a constant pointing to it, then pass the constant into QPA on your form), and you'd filter by the process instance ID to get the values from the correct instance.