File Transport Issue
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Applications Integration > File Transport Issue




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    File Transport Issue  
JT


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-04-05 10:56 PM

Hi all,
I am trying to pickup a file dropped off by BTS 2004, and then move it to a
new location.  I have created a simple file watcher service to do this (see
code below).  This works great if I manually drop a file in the source
folder.  However, if BTS puts the file there, nothing happens.  Any hints as
to why would be great.  The file is being dropped by a file send port, using
a custom HIPAA pipeline, along with a HIPAA send port, using PassThruTransmi
t
pipe.  Thanks.

John

Private SrcPath As String = "D:\BTS\CLAIMS\Claim_OUT\"
Private CIGNATgtPath As String = "D:\BTS\CLAIMS\Claim_OUT\DOODAD\CIGNA\"
Private CTCareTgtPath As String
=" D:\BTS\CLAIMS\Claim_OUT\DOODAD\CONNECTIC
ARE\"

Protected Overrides Sub OnStart(ByVal args() As String)

Me.FileSystemWatcher1.Path = SrcPath

Me.FileSystemWatcher1.EnableRaisingEvents = True

End Sub

Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your
service.
Me.FileSystemWatcher1.EnableRaisingEvents = False
End Sub
Protected Overrides Sub OnContinue()

Me.FileSystemWatcher1.Path = SrcPath

Me.FileSystemWatcher1.EnableRaisingEvents = True

End Sub

Protected Overrides Sub OnPause()
Me.FileSystemWatcher1.EnableRaisingEvents = False
End Sub


Private Sub FileSystemWatcher1_Created(ByVal sender As Object, ByVal e
As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Created

If e.ChangeType = WatcherChangeTypes.Created Then

Me.FileSystemWatcher1.Filter = "*.837"

If e.Name.StartsWith("62308") Then
TransportFiles(e.Name, CIGNATgtPath)
ElseIf e.Name.StartsWith("06105") Then
TransportFiles(e.Name, CTCareTgtPath)
End If

End If

End Sub

Private Sub TransportFiles(ByVal strFileName As String, ByVal destPath
As String)

Try

Dim strDestfileName As String = destPath & strFileName

If File.Exists(strDestfileName) Then File.Delete(strDestfileName)

File.Move(SrcPath + strFileName, strDestfileName)

Catch ex As Exception
Throw New ApplicationException("The Doodad Claim File Management
Service threw the following exception:  " & ex.ToString)
End Try

End Sub
--
John





[ Post a follow-up to this message ]



    Re: File Transport Issue  
yves dot peneveyre at ctp dot com


Report This Message To A Moderator Edit/Delete Message


 
08-05-05 07:48 AM

Hello John,

I think it is not a BTS issue, because I wrote such a watcher service and an
 asp.net
web application to put files in the source directory and it was not working.
As if the FileSystemWatcher did not see the file drop.

So, if anyone had this issue and solved it, I would be interrested to know h
ow.

Best Regards

Yves Peneveyre


[vbcol=seagreen] 
Hi all,
I am trying to pickup a file dropped off by BTS 2004, and then move it to a 
new location.  I have created a simple file watcher service to do this (see 
code below).  This works great if I manually drop a file in the source 
folder.  However, if BTS puts the file there, nothing happens.  Any hints as
 
to why would be great.  The file is being dropped by a file send port, using
 
a custom HIPAA pipeline, along with a HIPAA send port, using PassThruTransmi
t 
pipe.  Thanks.

John

Private SrcPath As String = "D:\BTS\CLAIMS\Claim_OUT\"
Private CIGNATgtPath As String = "D:\BTS\CLAIMS\Claim_OUT\DOODAD\CIGNA\"
Private CTCareTgtPath As String  
=" D:\BTS\CLAIMS\Claim_OUT\DOODAD\CONNECTIC
ARE\"

Protected Overrides Sub OnStart(ByVal args() As String)
 
Me.FileSystemWatcher1.Path = SrcPath

Me.FileSystemWatcher1.EnableRaisingEvents = True

End Sub

Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your 
service.
Me.FileSystemWatcher1.EnableRaisingEvents = False
End Sub
Protected Overrides Sub OnContinue()

Me.FileSystemWatcher1.Path = SrcPath

Me.FileSystemWatcher1.EnableRaisingEvents = True

End Sub

Protected Overrides Sub OnPause()
Me.FileSystemWatcher1.EnableRaisingEvents = False
End Sub


Private Sub FileSystemWatcher1_Created(ByVal sender As Object, ByVal e 
As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Created

If e.ChangeType = WatcherChangeTypes.Created Then

Me.FileSystemWatcher1.Filter = "*.837"

If e.Name.StartsWith("62308") Then
TransportFiles(e.Name, CIGNATgtPath)
ElseIf e.Name.StartsWith("06105") Then
TransportFiles(e.Name, CTCareTgtPath)
End If

End If

End Sub

Private Sub TransportFiles(ByVal strFileName As String, ByVal destPath 
As String)

Try

Dim strDestfileName As String = destPath & strFileName

If File.Exists(strDestfileName) Then File.Delete(strDestfileName)

File.Move(SrcPath + strFileName, strDestfileName)

Catch ex As Exception
Throw New ApplicationException("The Doodad Claim File Management 
Service threw the following exception:  " & ex.ToString)
End Try

End Sub
-- 
John





[ Post a follow-up to this message ]



    RE: File Transport Issue  
JT


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-12-05 01:47 AM

Amidst all of the 'My nice girlfriend', rhinestones, and lambskin that
pollute this newsgroup, can anyone actually answer my question please?
--
John


"JT" wrote:

> Hi all,
> I am trying to pickup a file dropped off by BTS 2004, and then move it to 
a
> new location.  I have created a simple file watcher service to do this (se
e
> code below).  This works great if I manually drop a file in the source
> folder.  However, if BTS puts the file there, nothing happens.  Any hints 
as
> to why would be great.  The file is being dropped by a file send port, usi
ng
> a custom HIPAA pipeline, along with a HIPAA send port, using PassThruTrans
mit
> pipe.  Thanks.
>
> John
>
> Private SrcPath As String = "D:\BTS\CLAIMS\Claim_OUT\"
> Private CIGNATgtPath As String = "D:\BTS\CLAIMS\Claim_OUT\DOODAD\CIGNA\"
> Private CTCareTgtPath As String
> =" D:\BTS\CLAIMS\Claim_OUT\DOODAD\CONNECTIC
ARE\"
>
>     Protected Overrides Sub OnStart(ByVal args() As String)
>
>         Me.FileSystemWatcher1.Path = SrcPath
>
>         Me.FileSystemWatcher1.EnableRaisingEvents = True
>
>     End Sub
>
>     Protected Overrides Sub OnStop()
>         ' Add code here to perform any tear-down necessary to stop your
> service.
>         Me.FileSystemWatcher1.EnableRaisingEvents = False
>     End Sub
>     Protected Overrides Sub OnContinue()
>
>         Me.FileSystemWatcher1.Path = SrcPath
>
>         Me.FileSystemWatcher1.EnableRaisingEvents = True
>
>     End Sub
>
>     Protected Overrides Sub OnPause()
>         Me.FileSystemWatcher1.EnableRaisingEvents = False
>     End Sub
>
>
>     Private Sub FileSystemWatcher1_Created(ByVal sender As Object, ByVal e
> As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Created
>
>         If e.ChangeType = WatcherChangeTypes.Created Then
>
>             Me.FileSystemWatcher1.Filter = "*.837"
>
>             If e.Name.StartsWith("62308") Then
>                 TransportFiles(e.Name, CIGNATgtPath)
>             ElseIf e.Name.StartsWith("06105") Then
>                 TransportFiles(e.Name, CTCareTgtPath)
>             End If
>
>         End If
>
>     End Sub
>
>     Private Sub TransportFiles(ByVal strFileName As String, ByVal destPath
> As String)
>
>         Try
>
>             Dim strDestfileName As String = destPath & strFileName
>
>             If File.Exists(strDestfileName) Then File.Delete(strDestfileNa
me)
>
>             File.Move(SrcPath + strFileName, strDestfileName)
>
>         Catch ex As Exception
>             Throw New ApplicationException("The Doodad Claim File Manageme
nt
> Service threw the following exception:  " & ex.ToString)
>         End Try
>
>     End Sub
> --
> John





[ Post a follow-up to this message ]



    RE: File Transport Issue  
WenJun Zhang[msft]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-12-05 12:51 PM

Hi John,

I agree with Yves, this should not be a biztalk issue. Maybe you'd
check the permission of files sent by Biztalk file adapter.

Also I think you may consider doing the task via WMI query, use
ManagementEvenWatcher resides in the System.Management namespace. The
WMI notification query should be like:

select * from __instancemodificationevent within 10 where
targetinstance ISA cim_datafile and
cim_datafile.name="c:\\filereceivedir"

Thanks.

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no
rights.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:02 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register