In a Pipeline Pilot protocol, there is sometimes the need to access the URL for the server where the protocol executes. For example, this could be useful for a callback or to create a hyperlink in a report or email.
A common way to get the server URL is to use the @SO @SE, if the protocol is run from the Pipeline Pilot Pro Client, you will get values like:
@ServerRoot = http://plp.mydomain.net:9944/
@ServerSSLRoot = https://plp.mydomain.net:9943/
But if the same protocol is run as a scheduled task, you will get:
@ServerRoot = http://localhost:9944/
@ServerSSLRoot = https://localhost:9943/
If the protocol for example sends an email with links to some reports created by the protocol, these links will not work from the end-users computer if they use localhost as the server name. In this case, the solution is to instead use the @'/pilot_settings/ROOT' and/or @'/pilot_settings/SSLROOT' global properties.
In short:
* @SA @ST
* @/pilot_settings/SSLRoot and @/pilot_settings/Root are URLs as as seen from within a server scisvr process.
Below is some additional information compiled from BIOVIA R&D sources about how the mentioned global properties are created.
The values of these global properties might differ depending on the configuration, e.g. if you use a load balancer, reverse proxy, grid engine etc.
Within Pipeline Pilot servers, there are multiple ways to refer to the server. @SA @SC (outside the reverse proxy). @'/pilot_settings/ROOT' and @'/pilot_settings/SSLROOT' are URLs as seen from within a job's scisvr process (inside the reverse proxy). For instance, if your server is called plp.mydomain.net and is listening on 9943 and 9944 and is configured behind a reverse proxy called revproxy.mycompany.com which is only listening on HTTPS port 8080, then for a client request made via the reverse proxy these would be each of the global values:
@ServerRoot: https://revproxy.mycompany.com:8080/ (NOTE: this URL is an HTTPS URL because the reverse proxy only has HTTPS available)
@ServerSSLRoot: https://revproxy.mycompany.com:8080/
@'/pilot_settings/ROOT': http://plp.mydomain.net:9944/
@'/pilot_settings/SSLROOT': https://plp.mydomain.net:9943/
If a client is inside the reverse proxy and connected directly to the PLP server (for instance, runprotocol.exe -server plp.domain.net "My Protocol"), the globals would actually be different because the URLs are set up for each job based on the hostname which the client used:
@ServerRoot: http://plp.mydomain.net:9944/
@ServerSSLRoot: https://plp.mydomain.net:9943/
@'/pilot_settings/ROOT': http://plp.mydomain.net:9944/
@'/pilot_settings/SSLROOT': https://plp.mydomain.net:9943/
If a runprotocol command is issued on the server itself with the following "runprotocol -server localhost", the globals would be configured as follows:
@ServerRoot: http://localhost:9944/
@ServerSSLRoot: https://localhost:9943/
@'/pilot_settings/ROOT': http://plp.mydomain.net:9944/
@'/pilot_settings/SSLROOT': https://plp.mydomain.net:9943/
