BizTalk Gurus

create a blank .flag file when a file is picked up.

rated by 0 users
Not Answered This post has 0 verified answers | 10 Replies | 2 Followers

posted on Thu, Jan 21 2010 11:26 AM

Hi,

My requirement is like When the input file is picked up one blank file should be created at receive location with .flag extension and once it is proceesed compeletely and sent to target location .flag blank file should be changed to .done extension.

Please help me any one how we can approach on this

All Replies

Top 75 Contributor
29 Posts

A quick though on this...

 

You could move this logic into an orchestration.

Using the context properties of the message you could identify where the source file arrived from and write out your .flag file to this location.   For this, I believe that you could use the File Adapter in a send port.

Do your processing...

Once complete you would then write out the .done file.  This could as well be done using the File Adapter in a send port.  

I believe that to delete your .flag file you will need to do this using an expression shape that deletes the file.  There are other ways to do this last one, but i am not currently aware of anyway to rename a file in a directory using the native biztalk adapters.

 

 

 

Top 25 Contributor
173 Posts
wearsy replied on Sat, Jan 23 2010 8:19 AM

Brunchey is on the right path....

To ensure your send port instance is successful you will want to use delivery notification (http://kentweare.blogspot.com/2007/11/biztalk-delivery-notification.html).  You don't want to mark you file as done if you send port is going through retries due to connectivity or disk issues.

You can use some .Net code to either delete the .flag file or simpley rename it.  You will need to write this code in an expression shape or reach out to a .net library to do this work.

You will be able to get the location of the inbound file via the file adapter's context property in an expression shape i.e

FilePath = MsgIn(FILE.ReceivedFileName)

Kent Weare BizTalk MVP
replied on Mon, Jan 25 2010 6:23 AM

Thanks for the reply.

But the requirement is it should create a blank .flag file when it is process in the Pipe line (Before reaching orchestration)

I want to create the .flag file when it is processing in the pipeline.

 

Top 75 Contributor
29 Posts

Then you will need to write a pipeline component.  There is a simple example of a pipeline component in the BizTalk Install directory at SDK\Samples\Pipelines\CustomComponent.  

Also, here is a pretty good online tutorial..

http://blogs.msdn.com/brajens/archive/2006/11/25/how-to-develop-biztalk-custom-pipeline-components-part1.aspx

http://blogs.msdn.com/brajens/archive/2006/11/25/how-to-develop-biztalk-custom-pipeline-components-part2.aspx

http://blogs.msdn.com/brajens/archive/2006/11/25/how-to-develop-biztalk-custom-pipeline-components-part3.aspx

 

Your code to write out this .flag file is going to most likely end up in the Execute method of your pipeline component. 

-Ben

Top 10 Contributor
230 Posts
xman71 replied on Mon, Jan 25 2010 9:15 AM

Hi,

 

   For your requirement, you might want to look into the BizTalk Server Pipeline Component Wizard, located at this site:

http://btsplcw.codeplex.com/

 

   Also, check out the following blog describing how to build a custom component that can be used in certain stages of a Receive or Send Pipeline:

http://geeksconnected.com/amjad/Lists/Posts/Post.aspx?List=5b472621%2D0dc3%2D410f%2D96ec%2D93d6d9071f0c&ID=7

 

   I hope this is enough information to get you going.

 

   Daniel.

"Google skills are more important than your coding skills."

replied on Tue, Jan 26 2010 6:59 AM

Thank you Ben. It's really helped for my requirement.

replied on Tue, Jan 26 2010 7:01 AM

Thank you Daniel, It's really very informative.

replied on Fri, Jan 29 2010 1:23 AM

Hi, I am planning to write Biztalk 70-241 exam. Can you please send me the study material and dumps, in case you have any?

My email ID is lion_cool99@yahoo.co.in

Thanks

Victor

replied on Fri, Jan 29 2010 11:33 AM

Thanks buddy. Do you also have Biztalk 70-241 certification dumps? Thanks!!!

Page 1 of 1 (11 items) | RSS