Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Error message to end users through batch file

gechio
5 - Atom

Hello,

 

I am currently running a Schedule that triggers an Alteryx workflow and then moves the source files to an archive, afterwards. I am triggering the Alteryx workflow with a batch file (using AlteryxEngineCmd.exe), but as of now, when there is an error in the Alteryx workflow (e.g. relevant files are missing), the .bat file doesn't capture it and send it to my schedule, meaning it continues to archive the source file. Is there any way to make Alteryx send an error message so that the batch files terminates out of error?

 

1 REPLY 1
jdunkerley79
ACE Emeritus
ACE Emeritus

Yes you can handle the normal error code status from Alteryx. Something like:

 

 

"C:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe" C:\Repos\TestError.yxmd >> c:\temp\alteryxcmd.log
if %ERRORLEVEL% neq 0 (
  echo Handle the log file!
  exit /B %ERRORLEVEL%
)

echo Do Something Fun and Exciting!

 

The log from the execution will be written to C:\temp\alteryxcmd.log

 

The batch file will abort with the same error code as Alteryx.

 

If you don't care about warnings then change the 'neq 0' to 'equ 2'

Labels