I've got a script running in a Foreach Loop Container, inside my package's Control Flow.
In the script, I am throwing a warning, then exiting with success
Dts.Events.FireWarning(-1, "", "warning message here", "", 0);
Dts.TaskResult = (int)ScriptResults.Success;
I've set the system Propagate variables all to false.
Also tried setting the Package property DisableEventHandlers to True.
However, duplicate warning messages are still being thrown in the order of:
I could possibly log each incident as Information instead of a Warning... but I dont want to log all Information. Logging all Warnings is much more realistic.
Create an OnWarning Event Handler for your script task. The event handler does not need any tasks of its own, but it does need its system variable Propagate set to False.