Global variable

Hi, how are you? I’m currently facing an issue with my services which contain global variables. After pushing these services to MSR and deploying them, the global variable gets deleted automatically. How can I make the global variable static so that it persists across deployments?

Hi Mohammad,

which version are you working with?
Can you provide some more details about your issue, please?
Where do you detect that the global variable got deleted, in IS Admin under Settings or the usage of the variable in the service?

Regards,
Holger

1 Like

I think you are not deploying your global variable properly. Global varialbes aren’t deleted automatically.

If you are using deployer, make sure you are selecting global variables when selecting the assets to deploy. Global variables are usually environment dependent hence usually not deployed.

1 Like

What do you mean by pushing ?
Global variables are stored in a file outside of your packages. So if you are pushing just packages then that won’t be enough.
You need to copy the file for global variables from

<SAG_HOME>/IntegrationServer/instances/default/config/globalVariables.cnf
<SAG_HOME>/IntegrationServer/config/globalVariables.cnf

You can also set global variables via configuration variables (application.properties) e.g.

globalvariable.myvar.value=value

if you have dots ‘.’ then you need to do it as

globalvariable.com..myvar.value=value
3 Likes

The problem was solved thank you for all .

Hi Yousef,
Can you indicate if your problem was solved by my recommendation or if not detail what you did? It will help other people who are search on a similar issue.

For any new queries I would recommend opening a new request, it will make it easier for people to respond.
regards,
John.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.