Strange issue with Precedence Constraints and Set Values

Hey everyone,
I have used the set values option of the execute package utility many times to change values on variables in the package with no problem before, however have run into a stumbling block when coupling this with precedence constraints. I have a package that goes down a different path based on a precedence constraint that works perfectly if the default value of a variable is used....however when I pass in a new value via Set Values in the execute package utility the package will error out with this:

The expression "@[User::IVR_FLAG] == 1" must evaluate to True or False. Change the expression to evaluate to a Boolean value.

IVR_FLAG is an int with a default value of 1, and if left that way(or changing it to another value in the package, as long as the default is used) this error will not occur....it will go down the proper path. But when Set Values is used to run the package to change IVR_FLAG, the above error occurs, which doesn't make sense since the above expression should still evaluate to either true or false. Anyone have any thoughts or suggetions
Thanks,
Adrian



Answer this question

Strange issue with Precedence Constraints and Set Values

  • colecovizion

    I think this is related to typing of parameters being passed in to packages. You have a similar issue with running dtexec and passing dates etc, they don't get typed as dates but as strings.

    Have a look at http://blogs.conchango.com/jamiethomson/archive/2005/10/11/2261.aspx



  • Toni Greco

    Well I fixed my own issue by passing in another var, evaluating it in a script task, and then setting the IVR_FLAG var in the script task. So apparently you can't use Set Values when executing a a package to alter a variable that is used in a precedence constraint. This seems like a hack of a solution, but it works, if anyone knows another way do tell.
    Thanks,
    Adrian

  • Strange issue with Precedence Constraints and Set Values