<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How can I acces global variables in an event start bean</title><link>https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean</link><description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Has anyone an idea how to solve this?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 05 Jun 2014 10:06:59 -0400</lastBuildDate><item><title>Comment by Marcel von Wyl on Daniel Oechslin's answer</title><link>https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean#747</link><description>&lt;p&gt;the .get("name") method return no value (i did not test if it is null or empty). Anyway it works now somehow, but i do not know why.&lt;/p&gt;
&lt;p&gt;Ivy ivy = Ivy.getInstance();
String var = ivy.var.get("HRM_IMPORT_ORDNER");&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcel von Wyl</dc:creator><pubDate>Thu, 05 Jun 2014 10:06:59 -0400</pubDate><guid>https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean#747</guid></item><item><title>Comment by Daniel Oechslin on Daniel Oechslin's answer</title><link>https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean#745</link><description>&lt;p&gt;What exactly does return null? The result of the request or is it a NPE?&lt;/p&gt;
&lt;p&gt;I guess you created an environment and you added your global to this env. And you set the environment in the server administrator as active.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Oechslin</dc:creator><pubDate>Thu, 05 Jun 2014 09:46:57 -0400</pubDate><guid>https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean#745</guid></item><item><title>Comment by Marcel von Wyl on Daniel Oechslin's answer</title><link>https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean#743</link><description>&lt;p&gt;yes I did try it, without any success.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcel von Wyl</dc:creator><pubDate>Thu, 05 Jun 2014 09:37:58 -0400</pubDate><guid>https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean#743</guid></item><item><title>Answer by Daniel Oechslin</title><link>https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean/742</link><description>&lt;p&gt;Hi Marcel&lt;/p&gt;
&lt;p&gt;did you try a static access as well like: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Ivy.var().get("name")
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Oechslin</dc:creator><pubDate>Thu, 05 Jun 2014 09:36:58 -0400</pubDate><guid>https://answers.axonivy.com/questions/741/how-can-i-acces-global-variables-in-an-event-start-bean/742</guid></item></channel></rss>