This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We have a basic workflow on Server that dynamically identifies the workflow user and uses the Run Command tool to execute a .bat file that pulls back the workflow user's home directory, this "widget" then get used on other larger workflows for outputting results.
Our Server workflows are configured to use the user's credentials, not a Server service account. The Run Command tool's Write, Run, Working Directory and Read location are all currently set to a location in the Server environment accessible by all users, to allow dynamic .bat file write, read, etc.
This works fine and gives us the required result. What I am conscious of though is using the same location each time may cause a conflict if two workflows using this widget are run at the same time. Therefore, I wanted to use the Server's relative _externals\1\ file paths instead but here I ran into a problem. While the dynamic .bat file is successfully written to a temp _externals\1\, the Run action does not pick the .bat file up from the same location, causing the error below.
Does anyone know how to resolve this, or do they have another way to utilise temp folders and avoid a potential conflict?
Instead of using _externals have the bat file created and executed from the same directory as the workflow when you're building it. When you upload it into the server environment, the bat file will be created in the "staging" directory that gets created for the purpose of the execution and you will reference it as the below in the Run Command tool.
It looks like the .bat file is not actually an output file option in the Interface properties box. I unticked the available output tools in any case to test and there was no difference in the Server output.