Is it possible to access the task link under the safe URI?
Discussion posts and replies are publicly visible
The other posters have mentioned the pattern, but is there a reason you need to do this? The process task link just needs the task ID and it will generate an appropriate link in the current environment (e.g. if you're currently in Tempo, it generates a Tempo link; if you're currently in Sites, it generates a Site link).