It is in global scope, I tried using global.restmsg name also but didn't work.