title: Precedence constraint in SSIS package performing not as expected
body: <p>In a SSIS package, I have a simple script checking if the file exists. If it doesn't then the process flow should stop.</p>
  
  <p>The script is correctly returning the file exist statement is false</p>
  
  <p><a href="https://i.stack.imgur.com/ddnEX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ddnEX.png" alt="Message"></a></p>
  
  <p>And based on the current precedence constraint, it should proceed only if the script returns value as true</p>
  
  <p><a href="https://i.stack.imgur.com/5MNC2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5MNC2.png" alt="Constraint"></a></p>
  
  <p>Here is the File exist flag for reference </p>
  
  <p><a href="https://i.stack.imgur.com/rBh59.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rBh59.png" alt="enter image description here"></a></p>
  
  <p>However, the package continues and then fails. I do not understand what I missing here or what I set up incorrectly.</p>
  
  <p>EDIT: Adding the actual script </p>
  
  <pre><code> public void Main()
      {
          string targetfile = Dts.Variables["User::FilePathLenovo"].Value.ToString();
          try
          {
              if (File.Exists(targetfile))
              {
                  Dts.Variables["User::FileExists"].Value = true;
              }
              else
              {
                  Dts.Variables["User::FileExists"].Value = false;
              }
  
              Dts.TaskResult = (int)ScriptResults.Success;
          }
          catch (Exception Ex)
          {
              Dts.TaskResult = (int)ScriptResults.Failure;
          }
          MessageBox.Show("File.Exists(targetfile): " + File.Exists(targetfile));
  
      }
  </code></pre>