Let's Get Social!
Focal Point    Focal Point Forums    iWay Software Product Forum on Focal Point    Iway 5.5 FileListener problem
 Go New Search Notify Tools Reply
 Iway 5.5 FileListener problem
Member
 posted June 05, 2008 09:36 AM
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

 Posts: 2 | Registered: June 05, 2008 IP
Gold member
 posted June 06, 2008 10:06 AM Hide Post
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

 Posts: 59 | Location: Birmingham, Blighty | Registered: October 30, 2007 IP
Member
 posted June 24, 2008 05:26 AM Hide Post
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.

 Posts: 4 | Location: London | Registered: November 01, 2007 IP
Member
 posted June 24, 2008 06:43 AM Hide Post
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>
<localtrans>false</localtrans>
<maxcount>1</maxcount>
<encoding>Cp1252</encoding>
<errpremit>false</errpremit>
<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: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>


 Posts: 2 | Registered: June 05, 2008 IP