I have the workflow created and saved in Alteryx server. When that is executed, sometimes it works and sometimes it triggers error as "Unable to open file for write: Can't open file as the process cannot access the file because it is being used by another process". What's the fix for this. Attached screenshots of success and failure messages of the same workflow ran on different time frames.
Silly question.
Do you happen to have the target file selected in File Explorer?
I have noticed in Windows that if a file is highlighted in File Explorer (especially if preview is active) then you get this exact kind of message.
I believe you’ll also get this error if anyone or any process is currently using this file aside from Alteryx. It can also happen if you have multiple parts of the workflow trying to write. If that’s the case, add a block until done before each of the outputs.
The output file is added in the Output tool by selecting the file from Browse window.
As you can see Block Until Done tool is placed in the workflow. I have 5 output tabs in a single Output file and the Block Until Done tool is placed one after the other to delay the data flow and reduce the occurrence of data write errors. However, the error still occur sometimes and sometimes its a clean success. Don't know how this can be controlled. The real challenge is because of these frequent inconsistent error occurrences the teams who we present the automation lacks confidence on the tool and so do I. I think its a bug in the tool.
Looking at the second image, have you tried placing the Block Until Done tool at that very first juncture (= after the Select Tool in the lower left of the second image)? The three work streams from that Select Tool do not (at least from the image) appear to be dependent upon each other.
You are right. Even though the data pass through the Select tool to the 3 outputs they are summarized and filtered and passed to 3 different output tabs. The reason why I placed Block until Done tool because without Block Until Done tool it showed file write error when tested the workflow in my designer.
If you provide me sample data of input files, I can provide a solution for you. Per your workflow, Block Until Done will not work alone, however I found a way to fix it.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |