Questions Tagged With globalvariablehttps://answers.axonivy.com/tags/globalvariable/?type=rssquestions tagged <span class="tag">globalvariable</span>enWed, 13 May 2020 05:41:31 -0400Can not add global variablehttps://answers.axonivy.com/questions/4570/can-not-add-global-variable<p>Hi supporters,</p> <p>I can not add global variable on ivy designer. Please refer to below logs and help to provide the idea.</p> <pre><code>Error Id: 1720D648AFF19A16 Stacktrace: ch.ivyteam.ivy.persistence.PersistencyException: Could not add default value at ch.ivyteam.ivy.config.internal.ConfigurationClass.createEmptyConfig(ConfigurationClass.java:213) at ch.ivyteam.ivy.config.internal.ConfigurationClass.addConfiguration(ConfigurationClass.java:116) at ch.ivyteam.ivy.designer.config.ui.editor.ConfigEditorPanel$12.run(ConfigEditorPanel.java:607) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: ch.ivyteam.ivy.cm.exceptions.UnsupportedLanguageException: Language &lt;en&gt; is not supported by cms at ch.ivyteam.ivy.cm.internal.ContentObject.addValue_aroundBody54(ContentObject.java:784) at ch.ivyteam.ivy.cm.internal.ContentObject.addValue_aroundBody55$advice(ContentObject.java:34) at ch.ivyteam.ivy.cm.internal.ContentObject.addValue(ContentObject.java:1) at ch.ivyteam.ivy.config.internal.ConfigurationClass.createEmptyConfig(ConfigurationClass.java:209) ... 16 more </code></pre> <p>Many thanks.</p>nqphucWed, 13 May 2020 05:41:31 -0400https://answers.axonivy.com/questions/4570/can-not-add-global-variableglobalvariableHow to override underscore global variables with environment variables?https://answers.axonivy.com/questions/4168/how-to-override-underscore-global-variables-with-environment-variables<p>Dear Ivy team, We are following <a href="https://developer.axonivy.com/doc/latest/engine-guide/configuration/index.html#overriding-configuration">this guideline</a> to override global variables in order to dockerize our ivy engine. But there is a problem, if the variable key contains underscores (For example: <code>ch_xpertline_luz_support_username</code>), the ivy will replace all underscores by dots !!</p> <p>Do you have any idea that helps us to overcome this situation? Thank you!</p>an_nguyenThu, 14 Nov 2019 06:02:21 -0500https://answers.axonivy.com/questions/4168/how-to-override-underscore-global-variables-with-environment-variablesdockerglobalvariableDocker, global variables, app.yamlhttps://answers.axonivy.com/questions/4162/docker-global-variables-app-yaml<p>Dear Ivy Team</p> <p>It looks like there are 3 places where the global vars can be set : - inside IAR - in DB - in app.yaml</p> <p>So what is the order how Ivy is looking for the global vars ?</p> <p>Thanks &amp; Regards, John Moser</p>John MoserTue, 12 Nov 2019 03:57:38 -0500https://answers.axonivy.com/questions/4162/docker-global-variables-app-yamldockerglobalvariableUsing global variable in web.xmlhttps://answers.axonivy.com/questions/2601/using-global-variable-in-web-xml<p>I want to create a context param by using global variable like this. But it doesn't work. Is there any way to do it?</p> <pre><code> &lt; context-param&gt; &lt; param-name&gt;primefaces.PRIVATE_CAPTCHA_KEY&lt;/param-name&gt; &lt; param-value&gt;#{ivy.var.get('private_captcha_key')}&lt;/param-value&gt; &lt; /context-param&gt; </code></pre>Cuong LeFri, 28 Apr 2017 00:56:16 -0400https://answers.axonivy.com/questions/2601/using-global-variable-in-web-xmlglobalvariableHow can I acces global variables in an event start beanhttps://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean<p>I am trying to use a file pickup event bean which starts the process as soon as it detects a file in a given directory. I already have such a bean, but it uses a fix bean editor input (which cannot be changed on the server) for defining the path in which to look for files.</p> <p>I would like now to replace this fix input with a global variable. But unforunately in the bean scope I have no access to the variable and ivy.var.get("name") returns null or empty.</p> <p>Has anyone an idea how to solve this?</p>Marcel von WylThu, 05 Jun 2014 09:33:46 -0400https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-beanglobalvariableHow to change the value of global variable of a selected environment programmatically and keep the default value?https://answers.axonivy.com/questions/227/how-to-change-the-value-of-global-variable-of-a-selected-environment-programmatically-and-keep-the-default-value<p>I tried to change the value of global variable like that:</p> <pre><code>public static void updateGlobalVariableValue(final String globalName,final String globalValue,final IEnvironment environment) throws Exception { SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable&lt;Void&gt;() { @Override public Void call() throws Exception { IGlobalVariable variable = environment.findGlobalVariable(globalName); if (variable != null) { variable.setValue(globalValue); } return null; } }); } </code></pre> <p>If in the selected environment, we didn't set the value of that variable, after execute my function, the default value of the global variable is changed.</p> <p>Is it a bug of API or I did the wrong way? Could you please show me the way to modify just the value of global variable in the selected environment and keep the default value?</p> <p>Thank you very much, Phu Nguyen</p>anphunlFri, 03 Jan 2014 10:59:04 -0500https://answers.axonivy.com/questions/227/how-to-change-the-value-of-global-variable-of-a-selected-environment-programmatically-and-keep-the-default-valueglobalvariable