SQLTeam.com | Weblogs | Forums

Script Task

Hi,

I have added custom events in script task. I can't see those in ssisdb execution results. What to do for that.Below is my code.
public void Main()
{
bool fireAgain = false;

        Dts.Events.FireInformation(3, "Testingg", "Testing at Script Task", "", 0, ref fireAgain);


        // TODO: Add your code here
        string filepath = "";

        try
        {
            filepath = Dts.Variables["User::ArcSourceFilePath"].Value.ToString();
            Dts.Events.FireInformation(3, "Testingg Try Block", filepath, "", 0, ref fireAgain);
        }
        catch (Exception ex)
        {
            Dts.Events.FireError(18, "Testingg Catch Block", ex.Message + " InnerException: " + ex.InnerException.ToString(), "", 0);
            //Dts.Events.FireInformation(3, "Testingg Catch Block", ex.Message + " InnerException: " + ex.InnerException.ToString(), "", 0, ref fireAgain);
        }
        
        Dts.Variables["User::CheckFileExists"].Value = File.Exists(filepath);
		Dts.TaskResult = (int)ScriptResults.Success;
	}

This might help