Last year I spent a post explaining a rather simple means enabling to display the Siebel Server name in OpenUI, IP13 at that time. Given the number of questions the article raised I opted to spend another post explaining it a bit further, improving it a bit and including the sources for IP14. But for a starter, have a quick read of the previous post.
The end result we aim for would be along these lines:
So, where do we start?
- First of all, the concept I came up with last year is based on the fact that every Siebel Server host will have an OS system variable defined. In my case it has been named “COMPUTERNAME“. So basically every Siebel Server will need to be configured with an environment variable, named as you’d like it. On Windows it’s easy, on Linux/Unix flavors you’d need to add it to the .profile for the user under which the Siebel Service process runs.
- To add-in a little flexibility I decided to create configurable System Preference which would hold the name of the environment variable. So you would be able to call it SIEBEL_SERVER_HOST or whatever you prefer. This could be an optional step, but hard-coding such parameters, should be a no-no to all among us. I named the System Preference SiebelHostEnvVar.
- The next step would be to configure two new fields in the the Personalization Profile business component. These fields would both turn out as Profile Attributes after a Web Session starts. Beautiful! And as said before – not widely known. The SiebelServerHost field will simply invoke a Business Service to retrieve the value of the OS environment variable. Nothing more, nothing less.
- Name: SiebelHostEnvVar
- Value: SystemPreference(“SiebelHostEnvVar”)
- Name: SiebelServerHost
- Value: InvokeServiceMethod(“Get Environment Variable”, “Get Environment Variable”, “‘Name’=’eval([SiebelHostEnvVar])'”, “Value”)
- The business service is as straightforward as can be. I condensed the initial version a bit further taking out unnecessary code.
- Now, the tiny few lines of “postload” code. Using a postload script comes with a warning, caution and instruction for good behavior. Do not overly use postload scripts. And if you use them, be considerate about the global impact. All navigations will be affected.
- A bit of styling with a golden edge. Add this snippet of CSS to your own override file.
- And finally, it needs to be added under Manifest Administration.
That’s all. Grab the code here if you like: