community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

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

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.

Alteryx Certified Partner
Alteryx Certified Partner

@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 reboot. Order shall return.
Asteroid

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

 

thanks

Highlighted
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. 

 

 

Labels