I have requirement to listen a file from path using wildchar file extn (*.enc). In order to the common activity, I want to get the path from where the file read and file name. Could somebody guide me how this can be read?
Not sure which page Pega writes while listening the file.
Location has to be specified in the Source Location in the File Listener (If you need to read from multiple folders, use GRS or create a different listener). The filter (*.enc) has to be specified in the Source Name Mask. That said, the page which has all other details is specified in the Service File rule (Page Name), this is referred to in the File Listener (Service Method field). You can run the File Listener and provide a file manually with tracing enabled to check all pages available during processing.
I am doing that currently. But what I want is listener listening the dynamic file names ( doc02012016.enc or doc03022016.enc....) Hence in the source file mask I used *.enc. I want to get the file name which listener is processing say doc02012016.enc... How do I get this name?
LogServiceFile Page contains the information that you are expecting. You can change the page name in your listener. Log @Page.getXMLOfPage(LogServiceFile) in your listener activity to see all the properties available in run time.