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.

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.

Has anyone an idea how to solve this?

asked 05.06.2014 at 09:33

Marcel%20von%20Wyl's gravatar image

Marcel von Wyl
1668
accept rate: 100%


Hi Marcel

did you try a static access as well like:

Ivy.var().get("name")
link

answered 05.06.2014 at 09:36

Daniel%20Oechslin's gravatar image

Daniel Oechslin
45771121
accept rate: 36%

edited 05.06.2014 at 09:37

yes I did try it, without any success.

(05.06.2014 at 09:37) Marcel von Wyl Marcel%20von%20Wyl's gravatar image

What exactly does return null? The result of the request or is it a NPE?

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.

(05.06.2014 at 09:46) Daniel Oechslin Daniel%20Oechslin's gravatar image

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.

Ivy ivy = Ivy.getInstance(); String var = ivy.var.get("HRM_IMPORT_ORDNER");

(05.06.2014 at 10:06) Marcel von Wyl Marcel%20von%20Wyl's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3

Asked: 05.06.2014 at 09:33

Seen: 804 times

Last updated: 05.06.2014 at 10:06