Question
Vodafone
Vodafone
IN
Vodafone
Posted: May 19, 2020
Last activity: Sep 29, 2020
Last activity: 29 Sep 2020 7:54 EDT
Closed
Solved
Any idea on how we can cisrcumstance the rule based on Environments like Dev, Stage , Prod ?
Any idea on how we can cisrcumstance the rule based on Environments like Dev, Stage , Prod ?

You probably do not want to use system name. This is something that can and should change based upon what you want to call your system. Here an example pipeline:
I would strongly recommend having your code use the Production Level concept so you don't have to predict forever what they exact system name is going to be.
I don't know what your use case is, but I just want to make sure you know about "Application settings" (8.4+) which were known before as "System Settings"
Configuring production-level-specific run-time settings by using application settings rules
One thing missing from this documentation is that you can get your system setting from Utilities • getRuleSystemSetting function.
You probably do not want to use system name. This is something that can and should change based upon what you want to call your system. Here an example pipeline:
I would strongly recommend having your code use the Production Level concept so you don't have to predict forever what they exact system name is going to be.
I don't know what your use case is, but I just want to make sure you know about "Application settings" (8.4+) which were known before as "System Settings"
Configuring production-level-specific run-time settings by using application settings rules
One thing missing from this documentation is that you can get your system setting from Utilities • getRuleSystemSetting function.
I would recommend away from referencing either system name or production level directly in your code. If possible, use Application Settings (aka System Settings not Dynamic System Settings) and reference the outcome of that.
If you actually want to have different logic and processing between different environments, I'm very concerned about your Quality Assurance process. There will be no real way to test your code until after it is in production.