When running an integration on a schedule or manually there may be times where there isn’t any data in the data source. You may also have post integration tasks that update variables or send an email. If you don’t want these tasks to run when there is no data in the source, you can set up this simple task.
Prefer a video explanation? Click here.
One option is to uncheck the “Return map Success” and “Return map Failure” on the Options tab of the map. If they are unchecked, the post integration tasks shouldn’t run.
If you are unable to uncheck the “Return map Success” and “Return map Failure” options, then follow these steps to stop the tasks from running when there is no data in the source.
Open the integration and navigate to the Tasks tab to a add a new task
- In the Tasks tab of the map, right click on “Tasks that run if the Integration fails” or “Tasks that run if the Integration succeeds” and create a new Run Script task.
- If you are unsure on which option to put the new task on, you can check under Options to see what happens if there is no data returned from the maps data source
- If you are unsure on which option to put the new task on, you can check under Options to see what happens if there is no data returned from the maps data source
- You can name this task whatever you like, then change the On Fail drop down to the “Cancel Processing” option. Then in the Script Code enter the code below. You can get the GlobalSuccessCount from the Global Variables -> System Variables.
if(GlobalSuccessCount > 0)
return true
else
return false
end if - Once you have created the task, make sure it runs before any other tasks. You can do this by using the arrows in the bottom right to move it to the top of the list.
- Save the new Task and the map.
- Now when you run the integration when no data is present the Post Map tasks won’t run.
This process is a bit easier on smartconnect.com as there is an option to disable tasks if no data was returned
- Navigate and open the integration you want to apply this to.
- Find the Options Tab, find the If Blank Lines in Data source line and select the Dont run any tasks option.
Have questions about disabling Tasks in SmartConnect or other solutions? Feel free to send us an email at support@eonesolutions.com