i have an expression bellow to read a file from resources :
#[Thread.currentThread().getContextClassLoader().getResourceAsStream('abc.txt')]
it worked fine, but i want to use a variable like this one:
#[Thread.currentThread().getContextClassLoader().getResourceAsStream(flowVars['fileName'])]
it does not work,
- how can i make it work like the first one MEL ?
- how can i read a file in absolute path "D://input/abc.txt" using MEL ?
Thanks for helps.
resolved
- use
flowVars.filename
instead offlowVars['fileName']
it worked, but i can't get it, i use logger with this MEL#[flowVars['filename']]
and it work too but in the second MEL it failed.