I have a SSIS package that is being developed in Visual Studio 2022 targeting SQL Server 2019 and I have a weird problem.
I have a data flow that refreshes a bearer token meaning it retrieves the token from the database, check the expiry and if it is expired, it refreshes it and if not, it reuses the token from the database. It then stores that token in a package scoped variable to use later in other data flows.
To update the token or reuse the token, I use two different script components that is routed through a conditional split with the following expressions:
- Output: "Token Expired", Expression:
HasExpired == TRUE - Output: "Token NOT Expired", Expression:
HasExpired == FALSE
The problem I am having is: My token is not expired but for some reason the void PostExecute()in the script component that is responsible for renewing expired tokens is being triggered. I did plenty of tests and it seems it works sometimes when I restart VS but it starts doing that again after few runs.
An idea what may be causing this?
I tried setting break points in the script components but the incorrect method still kept triggering. I also tried enabling data viewer and the data viewer shows the correct data but the wrong PostExecute() still triggers.


