Hello Mohammad,
Global variables is one of the good ways to hold your environment specific values, specially the secrets, by checking “is password” checkbox.
Any reason you are looking for different ways to achieve this?
One good way is to have these passcodes maintained in a file as configuration, and you fetch them from file system.
Have respective environment’s file hold the value of passcode specific to that environment. ( One time setup )
Pros:
Passcodes remain secure with only Admins having access.
Changing passcodes can be done in much easier way.
Another way you can achieve this, with some level of hardcoding. ( use only if these passcodes are not sensitive secrets)
Define a global variable which will return you the name of current_env ( Dev, Test, Prod etc )
Define a service with which will have all the env passcodes hardcoded in it, and based on the value of global variable current_env, it will return respective env’s passcode.
Downside of this approach will be changing passcodes will result in code change.
If you commit code to snv, all your passcodes are accessible to all developers. security issue.
#webMethods#configuration