How to identify which environment a BR is running in?

bhandelman
New Contributor III

I have some business rules that need to identify which environment the BR is running in. This is because they does different things in each environment. In one BR i want the process to run in Prod but not QA or Dev, in another i want to copy extract files to an external shared folder which is different for each environment.  I was thinking of using a dashboard parameter but if after a Prod to Dev/QA refresh i forget to change the value of the parameter, the BR will copy the files to the Prod external folder and i don't want that to happen. this is why i am trying to find a way to identify the environment without relying on the value in a parameter.  Any thoughts?

Have a great day!

Bill

1 ACCEPTED SOLUTION

hiren
New Contributor III

You could retrieve the connection URL using,

si.WebServerUrlUsedByClient

& differentiate the Environment by identifying specific keywords (Dev/Stage/Prod) in it.


View solution in original post

4 REPLIES 4

AK
New Contributor III

Please see if the substitution variable |AppName| helps. This is a general substitution variable cand provides the application name. It can be used in Business rules.

bhandelman
New Contributor III

Unfortunately we use the same application name for all our environments.  We are currently On-Prem.  When we refresh from Prod to Dev and QA we do not rename the Dev/QA applications.  if we did, that would work great. Any other thoughts?

hiren
New Contributor III

You could retrieve the connection URL using,

si.WebServerUrlUsedByClient

& differentiate the Environment by identifying specific keywords (Dev/Stage/Prod) in it.


bhandelman
New Contributor III

hiren, Thank you, that is exactly what I needed.