Skip to content
+1-888-319-3663

COMMUNITY FORUM

How to best terminate a map

Jody Wood asked 4 years ago
I have a few maps that upload transactions into GP.  The processing of the map is contingent of an “approval” document existing in a file share.  Basically, I’ve written a stored proc to run before the map to perform the following: 1) If the document exists, pass the link and continue processing. 2) If the document does not exist, perform a RAISERROR to cause SmartConnect to see the error as a critical situation and stop processing.  I have three child maps that run after the initial map.  
The functionality is perfect except that our infrastructure guys don’t like to see the SQL errors in the server’s error logs.  I have tried using SQL Validation in a task, but that only stops the initial map, and lets the child maps continue to run.  
 
What is the best way to completely terminate the map (and all child maps) if criteria is not met?
Jody Wood replied 4 years ago

I had a ‘duh-me’ moment. NULL=NULL. In order for the SQL Validation to terminate, some value has to exist to evaluate as FALSE. Basically, I amended my query to compare to my dataset to ISNULL(APPROVAL_DOC, ‘NO APPROVAL’) as Approval

Jody Wood replied 4 years ago

Retract that comment – it still allows the child maps to run. 🙁


If you would like to submit an answer or comment, please sign in to the eOne portal.