Download generated file document not working in native app

Hi there,   I’m working in a Native Mobile App and i’m trying to trigger a download of a PDF file, wich is generated inside a Microflow as shown below: This Microflow is initially called from a Nanoflow, since i’m working in Native, and the whole behaviour needs to star from the user clicking. Debugging with the use of breakpoints i can see that the whole flow is passing, and files are being created with AutoNumber names (like “1.pdf”, “2.pdf”, etc), but no actual download seems to happend. I cannot find any file anywhere, nor any notification of download is shown in status bar. It seems to me that the creation of the pdf file is going ok, but  i’m not managing to an actual download to happend. Any ideas on what i might be doing wrong?
2 answers

Ok, so as I understand your question you are generating a .pdf on the server and then want to download that document to your device's local storage, correct? Here's my thoughts on this.

  1. A download can only be triggered from the client, not from the server, and since a microflow can only pass NP or primitive values to a nanoflow you cannot directly download the generated document.
  2. You can return the ID of the generated document to the nanoflow that calls the microflow
  3. You can use this ID as an argument in a Deeplink
  4. You can use the Deeplink as URL in the native Webview widget to show a page where you can download the file through your browser.

Hi, i’ve worked with similar cases and here are the steps i use:

- Create the document server side

- synchronize the document to the device

- Get the guid of the document in the microflow and send it back as string to the calling nanoflow

- after the microflow call do a retrieve from database on the device using the guid you got back from the microflow