Focal Point
Iway 5.5 FileListener problem

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/6771046682

June 05, 2008, 09:36 AM
PMeesters
Iway 5.5 FileListener problem
Hi,

Anybody around that can assist me fixing a problem with a FileListener configuration.

In this case we're polling a folder for files on a networkshare. Sometimes these files are 5 or 6 Mb. The issue now is that these files are being picked up by the Iway Adapter before they are completely written to the Active Directory networkshare, resulting in useless files in our system containing only part of the message, and zero-characters at the end (where the data wasn't written yet)

I was wondering if I could configure the Iway listener (that uses the XDCopyAgent) in such a way that it won't start copying the file until it's no longer in use by the process that is writing it.

Any help with this issue would be greatly appreciated

Thanks,
Paul
June 06, 2008, 10:06 AM
AdeH
Paul,
I'd recommend you change the process that is creating the file to create a .tmp, and when it has finished transferring the data, get it to rename that file to .txt (or whatever extansion you're looking for). Make your listener listen for the .txt file.


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
June 24, 2008, 05:26 AM
ibi_Asif
as already mentioned the source application should write a tmp file first and then change the extension of the file when it is completed.

However, depending on what is inside the document you can try to work with the File Read agent with the file listener to see if this helps resolves your issue.
June 24, 2008, 06:43 AM
PMeesters
Thelistener is configured with this XML:

 
   <listener protocol="file">EDINE_unique
      <active>true</active>
      <destination hasPattern="true">d:\ednketen\edine\in\email\queue\*#.edn</destination>
      <timeout>4.0</timeout>
      <retry>600</retry>
      <sort>false</sort>
      <precedence>1</precedence>
      <file>\\sadm01da005\edine\Production\Gen\Channel\2eTimesConversion\</file>
      <localtrans>false</localtrans>
      <maxcount>1</maxcount>
      <encoding>Cp1252</encoding>
      <errpremit>false</errpremit>
      <autoReply>true</autoReply>
      <suffixin>*</suffixin>
      <nounzip>false</nounzip>
      <flat>true</flat>
      <optimize>performance</optimize>
      <scansubs>false</scansubs>
      <count>1</count>
      <duration>86400</duration>
      <agent class="com.ibi.agents.XDCopyAgent" name="iwCOPY_1">iwCOPY
         <active>true</active>
         <parm name="delay">1</parm>
      </agent>
      <eda:control>
         <eda:errorto protocol="as1" comment="" name="Monitoring">address@company.com
            <eda:param name="replysubject">iWay PRODUCTION: ERROR in processing confirmation message</eda:param>
            <eda:param name="smtphost">exch005</eda:param>
            <eda:param name="contenttype">application/XML</eda:param>
            <eda:param name="packaging">regular</eda:param>
            <eda:param name="compression">false</eda:param>
            <eda:param name="receipt">none</eda:param>
            <eda:param name="digestalg">sha1</eda:param>
            <eda:param name="encryptalg">des-ede3</eda:param>
            <eda:param name="cc">address@company.com</eda:param>
         </eda:errorto>
         <eda:errorto protocol="file" comment="" name="toERROR">d:\ednchain\edine\error\
            <eda:param name="createdir">false</eda:param>
         </eda:errorto>
      </eda:control>
      <registers/>
   </listener>