| Author |
Delay shape and File write/exists whats goin on?
|
|
| aaagent 2004-09-28, 5:52 pm |
| I have a simple loop that is writing files to my send port (that works
fine). I also need to do a File.Exists after the fact to make sure that the
file got written to the specified folder. Seems simple enough. I put in a
short time delay in a Delay shape and then do my Exists check right. Well BT
aparently holds those files in a buffer in memory until the complete
orchestration is over with (INCLUDING THE DELAY) and when I finally get
around to my Exists check which is the very last expression if returns
false. How in the heck do I do this?
| |
| Matt Milner 2004-09-28, 5:52 pm |
| you can put your send in a scope, set the DeliveryNotification property of
the port to Transmitted. Then you can catch a
DeliveryNotificationException.
This way you don't have to do the work of checking, and your cleanup code is
nicely encapsulated in your catch block.
Matt
"aaagent" <agent@nospam.com> wrote in message
news:eBohFUWpEHA.1300@TK2MSFTNGP12.phx.gbl...
>I have a simple loop that is writing files to my send port (that works
> fine). I also need to do a File.Exists after the fact to make sure that
> the
> file got written to the specified folder. Seems simple enough. I put in a
> short time delay in a Delay shape and then do my Exists check right. Well
> BT
> aparently holds those files in a buffer in memory until the complete
> orchestration is over with (INCLUDING THE DELAY) and when I finally get
> around to my Exists check which is the very last expression if returns
> false. How in the heck do I do this?
>
>
| |
| aaagent 2004-09-28, 5:52 pm |
| first i am unable to put my send port in a scope only my message.
second why is BTS filled with all of these silly work arounds rather than
simple straight forward programming paradigms?
"Matt Milner" <matt.milner@m3technologypartners dot com> wrote in message
news:%23GvBtaWpEHA.1668@TK2MSFTNGP14.phx.gbl...
> you can put your send in a scope, set the DeliveryNotification property of
> the port to Transmitted. Then you can catch a
> DeliveryNotificationException.
>
> This way you don't have to do the work of checking, and your cleanup code
is
> nicely encapsulated in your catch block.
>
> Matt
>
>
> "aaagent" <agent@nospam.com> wrote in message
> news:eBohFUWpEHA.1300@TK2MSFTNGP12.phx.gbl...
a[vbcol=seagreen]
Well[vbcol=seagreen]
>
>
| |
| Devdutt Patnaik 2004-09-28, 5:52 pm |
| Since you are doing the Sending inside a Loop, I think the adapter's
batching mechanism comes into play.
Regards
Dev
"aaagent" <agent@nospam.com> wrote in message
news:%23nuRHmWpEHA.800@TK2MSFTNGP14.phx.gbl...
> first i am unable to put my send port in a scope only my message.
> second why is BTS filled with all of these silly work arounds rather than
> simple straight forward programming paradigms?
>
>
> "Matt Milner" <matt.milner@m3technologypartners dot com> wrote in message
> news:%23GvBtaWpEHA.1668@TK2MSFTNGP14.phx.gbl...
of[vbcol=seagreen]
code[vbcol=seagreen]
> is
that[vbcol=seagreen]
in[vbcol=seagreen]
> a
> Well
get[vbcol=seagreen]
>
>
| |
| aaagent 2004-09-28, 5:52 pm |
| ok how do i negate this batching mechanism
"Devdutt Patnaik" <aquarius@taurus.com> wrote in message
news:%23HHghIXpEHA.3252@TK2MSFTNGP14.phx.gbl...
> Since you are doing the Sending inside a Loop, I think the adapter's
> batching mechanism comes into play.
>
> Regards
> Dev
> "aaagent" <agent@nospam.com> wrote in message
> news:%23nuRHmWpEHA.800@TK2MSFTNGP14.phx.gbl...
than[vbcol=seagreen]
message[vbcol=seagreen]
property[vbcol=seagreen]
> of
> code
works[vbcol=seagreen]
> that
> in
> get
returns[vbcol=seagreen]
>
>
| |
| aaagent 2004-09-28, 5:52 pm |
| I guess no one knows.
"aaagent" <agent@nospam.com> wrote in message
news:umbdvxYpEHA.3572@TK2MSFTNGP10.phx.gbl...
> ok how do i negate this batching mechanism
>
>
> "Devdutt Patnaik" <aquarius@taurus.com> wrote in message
> news:%23HHghIXpEHA.3252@TK2MSFTNGP14.phx.gbl...
> than
> message
> property
> works
put[vbcol=seagreen]
right.[vbcol=seagreen]
complete[vbcol=seagreen]
finally[vbcol=seagreen]
> returns
>
>
| |
| Devdutt Patnaik 2004-09-28, 5:52 pm |
| I think I read somewhere that the default batching is of 5 messages for the
FILE Adapter, but iI might be wrong. You could write your custom adapter,
that closes the file stream explicitly. But even then what you are trying is
very indeterministic. How long are you going to put the delay for? What
happens if the file is too big and the delay is not enough? Or too small and
you wind up wasting time?
What Matt Milner has suggested would be the cleanest way to achieve your
goal, and it is NOT a workaround. I think you are not taking into account,
the fact that the architecture is based on a pub-sub mechanism (in your case
the Orch is the pub and the send port is the sub, and both are separate
entities), and is not plain vanilla sequential execution. Hence the reverse
direction communication using DeliveryNotifications(and ACK/NACK) is
available.
Also, you are supposed to put your Send SHAPE inside a synchronized scope,
not a send port. The second requirement is that the send port should have
DeliveryNotification set to Transmitted.
Hope that helps
Regards
Dev
"aaagent" <agent@nospam.com> wrote in message
news:umbdvxYpEHA.3572@TK2MSFTNGP10.phx.gbl...
> ok how do i negate this batching mechanism
>
>
> "Devdutt Patnaik" <aquarius@taurus.com> wrote in message
> news:%23HHghIXpEHA.3252@TK2MSFTNGP14.phx.gbl...
> than
> message
> property
> works
put[vbcol=seagreen]
right.[vbcol=seagreen]
complete[vbcol=seagreen]
finally[vbcol=seagreen]
> returns
>
>
| |
| Matt Milner 2004-09-29, 3:03 am |
| As noted in another response, it is your send Shape that goes into the
scope.
These aren't really silly work arounds, BizTalk is a different development
paradigm based on messaging based applications. You should not expect that
everything will work as if you were writing a C# business application. If
you do, you'll get frustrated and likely not take advantage of many of the
truly powerful features of this type of server/architecture.
Matt
"aaagent" <agent@nospam.com> wrote in message
news:%23nuRHmWpEHA.800@TK2MSFTNGP14.phx.gbl...
> first i am unable to put my send port in a scope only my message.
> second why is BTS filled with all of these silly work arounds rather than
> simple straight forward programming paradigms?
>
>
> "Matt Milner" <matt.milner@m3technologypartners dot com> wrote in message
> news:%23GvBtaWpEHA.1668@TK2MSFTNGP14.phx.gbl...
> is
> a
> Well
>
>
| |
| Ravi Annepu [MSFT] 2004-11-15, 8:46 pm |
| One possible solution is to have another orchestration to do the
File.Exists check and invoke that orchestration using an Exec shape.
Thanks.
Ravi Annepu.
--------------------
| >>From: "aaagent" <agent@nospam.com>
| >>Subject: Delay shape and File write/exists whats goin on?
| >>Date: Tue, 28 Sep 2004 10:11:15 -0400
| >>Lines: 10
| >>X-Priority: 3
| >>X-MSMail-Priority: Normal
| >>X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
| >>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
| >>Message-ID: <eBohFUWpEHA.1300@TK2MSFTNGP12.phx.gbl>
| >>Newsgroups: microsoft.public.biztalk.orchestration
| >>NNTP-Posting-Host: uslec-66-255-112-6.cust.uslec.net 66.255.112.6
| >>Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12
.phx.gbl
| >>Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.orchestration:8367
| >>X-Tomcat-NG: microsoft.public.biztalk.orchestration
| >>
| >>I have a simple loop that is writing files to my send port (that works
| >>fine). I also need to do a File.Exists after the fact to make sure that
the
| >>file got written to the specified folder. Seems simple enough. I put in
a
| >>short time delay in a Delay shape and then do my Exists check right.
Well BT
| >>aparently holds those files in a buffer in memory until the complete
| >>orchestration is over with (INCLUDING THE DELAY) and when I finally get
| >>around to my Exists check which is the very last expression if returns
| >>false. How in the heck do I do this?
| >>
| >>
| >>
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
|
|
|
|