Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Boneheaded approach to environment variables in inlines
System
The documentation is nice and clear that an inline gives you access to four handy, dandy environment variables - IW_USER, IW_DCT, IW_ROLE, and IW_WORKAREA. What it isn't real clear about is that before it sets those environment variables, it apparently completely clears the environment. Now admittedly, this should have been obvious to me from times where I've had to set environment variables to get database drivers to work, but in those cases, I generally assumed that the variable was a user variable rather than a system variable, so it wasn't getting past. It
never
would have occured to me that anyone would think that what is actually done could possibly be justified as a good idea.
I wouldn't have found this except I had an inline that has to make a call to a web service that would work consistently from the command line and fail consistently when run in a template, with an error of "Bad protocol 'tcp'". It took quite a bit of googling to find out that perl's getprotobyname() function depends on the SYSTEMROOT env var being set so it can find the protocol file.
Perhaps someone from engineering will comment and explain how I am just unenlightened and then I too will be converted to the school of "why would we possibly want to inherit system level environment variables that a system administrator has carefully and lovingly configured when we could just force the developer to start with a blank slate?".
Find more posts tagged with
Comments
There are no comments yet