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

terminate workflow and writing in a database in case of error

jeanilieski
8 - Asteroid

Hi Community, 

 

l know that  there are ways around with the "Count" tool to avoid writing in the database after error has occurred during the workflow. However, sometimes we do not only want to Append while writing in the database. So my question is: is there a straight forward icon or setting of the workflow in general which interrupts the workflow and (MORE IMPORTANTLY) the writing in the database once even a single error appears before the writing in the DB at the end of the workflow?

 

Thank you very much!!! 

2 REPLIES 2
afv2688
16 - Nebula
16 - Nebula

Hello @jeanilieski,

 

You could create with the message tool or with the test tool a condition to run an error when something doesn't add up.

 

After, you would need to click on the checkbox in the events tool to stop the run after an error has been found (first one from the list on the bottom):

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

danilang
19 - Altair
19 - Altair

Hi @jeanilieski 

 

To add to what @afv2688 said, you have to structure your workflow to make sure that the Message tool is actually executed before the Output tool.  Alteryx does not automatically run a workflow from top to bottom, i.e. if you connect 2 tools to the output of a tool, there no guarantee that the top one will execute first.  In order to ensure that the message tool is evaluated before your database write, use a Block Until Done tool with the Message tool stream on output connection 1 like this

 

w.png

 

with the message type in the Message tool configured to Error.  This, coupled with the workflow setting to Cancel Running Workflow on Error, will stop the output from writing to the database if there is any error.

 

Dan

Labels