This should work, but you need to be aware of extension scoping. If you have scoped the extension to anything other than "All Tags" then the UDO variable will only be seen by the tags the extension is scoped to.
Also, if you are trying to use "product_state" as the basis of a load rule, then be aware that by default extensions run after load rules have already been run.
Have a read of this article
And for figuring out about running the extension before load rules, https://community.tealiumiq.com/t5/User-Documentation/utag-js-Versions-4-33-through-4-39-Release-Not...
If this doesn't help, then let us know in what sense the UDO is not being populated - what are you trying to do with that data source and how are you checking it?