Hi Everyone,
I made a post the other week here looking to pause my workflow after generating a report and wait for user input before initiating a SQL transaction. I got a great reply using R, and while it wasn't quite what I was looking for, they sent me down the path that eventually led to me deciding to try and turn each of my workflows into an analytic app (the original one already was), and then On Success, run the next one in the chain. I do this through the Interface Designer configuration tab in my first and second app. They are also configured to display the results to the user. My app flow looks like this:
1) Take user input and generate report, save files to temporary excel file in _externals/2/temp.xlsx, On Success: Run 2)
2) Wait for user to type "CONFIRM" and submit. On Success: Run 3)
3) Read in the temporary excel file created from 1), append these records to a SQL table.
For my testing purposes, I was just trying to write to another excel output in 3), as a proof of concept that I can access these temporary files on a Gallery Environment.
The workflow seems to work as I want when running locally, however when I try to do the same thing on my Gallery Environment, I don't get any outputs (not even the report, which is required to be viewed before the second workflow can run). And it doesn't appear to generate an excel file at the end. Again, there are no outputs when there should be potentially 3: 1) initial report, 2) temp excel file, 3) "final" excel file (which would in production be a SQL write). I've had some issues previously with trying to use the CReW runner tools on Server, and I'm not convinced they would fix this issue either way.
Does anyone have a suggestion to how I could improve this workflow to see the outputs of each workflow before asking for the second set of questions (the user confirmation)?
I appreciate any help you guys can give me,
Cheers!
Solved! Go to Solution.
Hi @tcroberts
Although the apps are chained, when they run on the server, they run in separate "containers" which means that if you output the results into a temp folder with relative path, only the first app will understand where this is (the folder from which the workflow runs).
To make this work, make sure you output the results into a network drive accessible from the server and by the server user and use UNC path when configuring the I/O connections. This way each of the apps will know exactly where the files are.
Michal
Thanks!
I've managed to find an alternative solution to using these chained apps, but this is great to know going forwards, as I can foresee getting a lot of use out of chained workflows.
Really appreciate the answer, as I'd been stumped for a while now
Hi,
What was your alternative solution?
Chris
An alternative would be to keep all assets - all chained workflows and files - within the same directory when developing the process. In this case using relative paths will work as all chained apps will be executed from within the same container.
When saving the workflows, make sure you remove the folder path and only keep the file name
Just to clarify on this, to make this work you need you need to do the following:
This took a lot of trial and error so I hope this helps someone