The SiteContext and the site ID are usually available within the context of a request. So, I guess that the wait step is long enough for the request to be lost/closed and thus no context is available. You may need to store the value into some persisting storage or use different way of getting the site ID you need, based on some other object info.