Im trying to setup my application to provide a download link to a generated file, and then continue with the application flow after the user clicks the download link.  My application generates a script file, then provides a download link.  When the user clicks on the download link, it has to record that the download happened, and then exit the script generation component.<br>
<br>I have the following method:<br><br>downloadScript<br>    self markAsApplied.<br>    self requestContext respond: [ : response |<br>        response contentType: &#39;text/plain&#39;;<br>        attachmentWithFileName: &#39;EMS.conf&#39;;<br>
        nextPutAll: self generatedScript.<br>    ].<br><br>Which marks as applied, and causes the browser to download the file. But I afterwards I need to call: &quot;self answer: true&quot;  so the component will exit.<br>
just adding: &quot;self answer: true&quot; at the end of the method doesnt work.<br><br>I found WARequestContext&gt;&gt;respondAndContinue:  but that did not work -- the block argument is a url instead of the response object<br>
<br>How do I resume processing after doing a download?<br>