Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Pause workflow if file is being used by another process and then resume after close

mkav9893
8 - Asteroid

Hi, after running my workflow and attempting to overwrite the existing output file, I have encountered the error "File was is being used by another process" because I mistakenly left the file open while the workflow was running. After having done this many times, I was wondering if it would be possible to pause the workflow if the output file is being used by another process, and resume with writing the file after it has been closed.

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@mkav9893,

 

This is so frustrating!  There is a fairly easy solve to it.  Stop writing to Excel!

 

Ok, that was fun to write.  But here's another thought for you:  Write it to a temporary file with a UNIQUE name too (yxdb).  If for some reason your output to the "existing" file is not permitted, you can still have the data ready for you to overwrite the output file with.  

 

There are enhancements that you can make to this approach.  You could also use the CReW runner macros and first open the output files.  If you open them without error, then you can run the real workflow.  If the open fails, then you know that before you actually try to output to them.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
david20100
8 - Asteroid

Can you start from the temp yxdb to copy in excel after the first one has finished?

 

thanks

sanjdhar
7 - Meteor

I am encountering a similar issue, but with yxdb file as the output. The workflow is run through CRew macros, where the first stage reads from SQL server and outputs to a temporary holding yxdb file. The workflow runs every 2 hours via a scheduler. The workflow aborts once in a while with the following error message, but then clears itself in a subsequent run:

 

Error creating the file " ..\Plan QRF Actuals Forecast Holding.yxdb ": The process cannot access the file because it is being used by another process

 

I haven't been able to figure out what is causing the issue. 

 

 

JokeFun
8 - Asteroid

suggest check this thread:

Check file lock status 

Labels