The variable from Generic JavaScript View is updated with the expression value in the code when you click on apply and close button. If you simply execute it the flow variable will be there but only with the default value.
Have you tried the Extract Context Properties node? There you have the job ID and the workflow path. I am not so sure but, I think you can build the URL from that.