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

Using multiple command tools to write to the same file suspends the workflow

aprofir
6 - Meteoroid

Hi,

 

I am running into a small issue with an application which writes logs to the same .txt file located on a shared drive. My workflow is used by the users to upload files to a specific directory and at the same time, I have "logging mechanism" which writes to a .txt file what client was selected, what files have been uploaded, period, etc.

 

I am using Command tools to append to the .txt file.. and when multiple logs are written, the workflow completes just fine, everything is in the log, but the following appears:

 

aprofir_0-1581345870687.png

 

My workflow looks something like this:

 

aprofir_2-1581346185977.png

 

I was thinking that maybe putting the tool "wait a second" would help, but that did not work too. I could try and use "block until done", but those containers are activated by a drop-down and I am not sure how that would play in.. If anyone has any ideas for a way around it I would appreciate it.

3 REPLIES 3
patrick_mcauliffe
14 - Magnetar
14 - Magnetar

@aprofir  

In my experience, block until done is the best before writing out to a file.

To truly make them run separately, you can put the output into a batch macro.

aprofir
6 - Meteoroid

Thanks @patrick_mcauliffe I will give it a try and come back.

aprofir
6 - Meteoroid

I did not make it work with stop until done, but I figured out the problem. The command tools were writing to the same .bat file name. After changing the .bat file to something different then it worked without a problem. 

 

The same name for the .bat file was passed for all the command tools:

aprofir_0-1582216506858.png

Now, I have a different name for each one of them:

aprofir_1-1582216543965.png

 

A good thing that I was able to test with this is that you can append to the same file using command tools as long you use different names for the .bat files everything is okay.

 

Labels