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.
I was able to run the original without error. Although It isn't necessary to have multiple block until done tools chained together. I had no write errors that you were seeing. Is it possible that server is somehow "opening" the file after the first output and interrupting the process?
Please remember, you're writing to the same Excel files, but different tabs. You cannot write to the same excel but different tabs at the same time. So, your logic 'block until done' was correct, however the problem is, more than one output was trying to write to the same excel, but different tabs at the same time, which was causing the error. You used block until done in three different legs, so basically all runs independently. What you should do, you should tell to Alteryx, to write to the excel, the first tab, finish to write, close the process, then write to the second, finish and close the process, and so on..... This is the reason I used parallel block until done. When I run on my end it worked, but you can also add 'block until done' between two parallel block until done.
Consider another variation. I added block until done. So this works like that.....
It writes to the first sheet, which comes from '1'. Then it waits to finish the process '1', because '2' has a block until done. When '1' was completed, your data goes thru '2', block until done unblock the connection, your data goes thru '3', then to '4', and writes your data to other tab on your excel. Until this completed, your data for the another tab doesn't go thru '5', because the other process is not completed yet, and it is blocked. When 2nd sheet was completed, your data is good to go thru '5'. I used that logic to write more than 50 excel tabs, and it works perfect.
Thanks for your help. But when I try to load this to server I get the below error. Is the Parallel Block Until Done tool comes along with 2023 version? My server is still 2022 version, is that the reason why I get the below error.
Sorry I forgot to mention that. For parallel block, I use CreW macros installed.... You can download it from http://www.chaosreignswithin.com/p/macros.html
for Cleanse, it's default Alteryx tool, you can replace with the ones you have.
I have the crew macros installed in my 2022 version designer. Can you please elaborate on the Cleanse tool. I searched but could not find it. All I have is the Data Cleansing Tool highlighted in the screenshot below. Please guide me what I have to do.
That's correct.... cleanse.yxmc is the data cleansing tool. I used 2022.3.1.486.... It shouldn't return an error. If it's, you can just make a change on your original workflow like I did, by adding parallel block. :-)
I tried adding Parallel Block Until Done tool as suggested however, it failed. Please see the screenshot.
Please check the location of the excel you write. Be sure either you create or overwrite. If it's already created, you can't create, but overwrite.
Try only adding a block until done before each output and one before the select tool below.
Still the same error.
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |