Question
Working of File Listener
Hi Team, Can any one of you explain, while any file is being processed by file listener ,is that file be still there in the listener hearing path till it moves up to completed/deleted? If yes . can we read that file during service file processing using LogServiceFile.pyPathName in activity before parse segments? And what will initial activity in service file do exactly? will it be executed before file processing or while processing?
From Unable to move file to working file listener directory | PDN article file will be moved to working folder . where this working folder will be created , inside work_listner directory or direct listner picking up directory.
Thanks , Suresh
***Updated by moderator: Lochan to add Categories***
Hi Suresh,
Both the file listener and the file service have a part in processing the files. When the listener starts, it creates subdirectories in the file directory it is monitoring. When files that match the pattern the listener is listening for arrive, the listener moves the files into a subdirectory named
work_<name of listener>
and calls the file service.The file service uses a parse rule (XML, structured, or delimited) to open and read the file, evaluate each input record, divide the records into fields, and then write the fields to the clipboard. The service activity can then process the data – pass the data to another rule, or start a flow and create a work object based on the data, for example.
When the file service finishes processing the file, the listener either deletes the file or moves it to the
work_<name of listener>/completed
subdirectory, depending on how the listener is configured.