Alteryx Designer Desktop Discussions

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

Stop a process when there are data in one part of a Join and send an email

PavyJP
5 - Atom

Hello,

 

This might have been asked before but I cannot find the answer. I have a process that takes data from a file where a field contain clients' ID codes. The Join tool is getting the client full name from another file, based on the client code in the first file. 

I want the process to stop if the Join has some data in the left output (meaning some client codes in the first files are not present in the second file), and then send an email with the list of errors (this part works fine. the "basic table" is the list of error coming from the left output of the Join).

I've tried to put a Count tool after the left output linked to a Message/Error tool but this stops the process totally without sending the email. What would be the most efficient way to accomplish this? Thanks in advance for your help!

Capture.JPG

4 REPLIES 4
Christina_H
14 - Magnetar

Can you use a Block Until Done after the append?  So it will process the email, then move on to the error tool forcing the workflow to stop.

MarqueeCrew
20 - Arcturus
20 - Arcturus

@PavyJP ,

 

I think that this is a trick question (tagging @NicoleJ ) because if you have an ERROR in your workflow, then you will see this:  Warning: Email (6): No Messages were sent because the workflow has an error.0

 

Using a Message tool in this fashion isn't the way that I'd send the email.  I'd use an EVENT (link to help) that is triggered on an ERROR condition.  You might want to use a CReW macro (e.g. ExpectZero) or you could use a MESSAGE tool configured as:

BEFORE FIRST RECORD

ERROR

[_RecordNumber_] > 0

 

Now comes the bonus trick question that you asked.  You want to STOP running the workflow on that error.  That request is harder than it looks.  Yes, you can use the Runtime configuration to "Cancel Running Workflow on Error", but by then it is possible that output has already gone away from your workflow.  In fact, the workflow likely will not stop.  Alteryx doesn't work that way.

 

With the message (ERROR) set and with the event set to email you on error, you're good to go.  If you really want to stop, I wouldn't let ANY data go further than your join until you completed your join with 0 output from that left anchor.

 

Here is a working example (but without the email event being set):

 

capture.png

 

@DataNath suggested that I review this post. 

 

Cheers,

 

Mark

 

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
PavyJP
5 - Atom

 

Hello Christina,

 

Thanks for your input. I have actually did that but it didn't stop the process to continue until the end. I probably didn't configure it the right way.

PavyJP
5 - Atom

Thanks Mark! That's a lot of things to digest for me so I will look in to it and revert if I have questions!

 

One advice that I got from one of our consultant was to split the flow in 2, each part triggered by the user in Gallery via a radio button.

The first part would test the join to warn the user of the errors and the second one would run the flow normally, but it means that the user stil needs to make sure that there's no error. There's always a chance that the user would run the flow with remaining errors (and not be aware of it).

 

 

Labels