Get total number of files processd by BizTalk

My scenario is as follows : 

I have a  receive port which contains two receive location:first one used  a scheduler  adapter and 2nd one is used a file adapter.

When scheduler starts then the file processed.

But when we have more then one file in file receive location then only the first one file is processd. Why it is happening ?

To resolve this issue,I thought that I will count the number of files from receive location and then make a loop and processed

those file as seen in the following   screenshot:

but how will I get that how many files are there in receive location ?


August 31st, 2015 5:33am

Hi,

You should implement a Sequential Convoy pattern in your orchestration to receive every file that is present in the receive location in the same orchestration.

Please, take a look at the following links:

https://msdn.microsoft.com/en-us/library/aa561843.aspx

https://msdn.microsoft.com/en-us/library/aa547554.aspx?f=255&MSPPError=-2147217396

And a sample:http://girishbiz.blogspot.com.es/2014/02/biztalk-design-patterns-sequential.html

Regards.

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 6:23am

Thanks for the reply ohwari.

I tried with the following orchestration design:

I break the loop with the following condition : 

loopCount<=2

But it is static.I want to break the loop on how many input file I received from file receive location ?

If there is three file then the loop will be run three time.How can I achieved

August 31st, 2015 6:51am

Why do have both the Scheduled Task Adapter and File Adapter on the Receive Port?  Meaning, why can't you use use just the File Adapter?

If you want to pickup files at a certain time only, then use the Service Window on the Schedule tab of the Receive Location.

The reason it's picking up only one file is the Scheduled Task Adapter's file provide is firing only once, and picking up only one file.  That's just how it's coded.

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 6:59am

Hi,

I think the easiest way is to use a Listen with a Receive and a Delay shape if you don't know how many files are in the receive folder.

Configure the delay with a TimeSpan of 5 seconds for example. If no file is received in this interval (no more files available in the receive location), the delay shape will be fired. In the delay branch, you should exit the loop because there are no more files in the receive folder.

Regards.

August 31st, 2015 7:03am

You can only use file adapter to poll data from the file location and schedule the file adapter schedule window to run at specified interval of time .

Is there any problem you are facing while implementing your solution with file adapter only ?

Thanks

Abhishek

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 7:23am

Hi All,

Actually this orchestration will run only once in a month on 1st day 6.00 am.So we have to use scheduler adapter.

August 31st, 2015 7:55am

Can you please explain what is the requirement here..
Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 8:26am

I just want to get the total count of input message received in received
August 31st, 2015 8:29am

Ok, this can be very simple.

If you have to process all waiting files at 0600 on the first of the month, then create a Windows Scheduled Task that moves all waiting files from the drop off location to another folder where the File Adapter Receive Location is watching.

Leave the Receive Location Enabled all the time.

Important question: Do the files have to be processed in some particular order or one by one?  We can't any more advice until we know this.

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 8:31am

Ok, this can be very simple.

If you have to process all waiting files at 0600 on the first of the month, then create a Windows Scheduled Task that moves all waiting files from the drop off location to another folder where the File Adapter Receive Location is watching.

Leave the Receive Location Enabled all the time.

Important question: Do the files have to be processed in some particular order or one by one?  We can't any more advice until we know this.

August 31st, 2015 12:29pm

Ok, this can be very simple.

If you have to process all waiting files at 0600 on the first of the month, then create a Windows Scheduled Task that moves all waiting files from the drop off location to another folder where the File Adapter Receive Location is watching.

Leave the Receive Location Enabled all the time.

Important question: Do the files have to be processed in some particular order or one by one?  We can't any more advice until we know this.

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 12:29pm

Ok, this can be very simple.

If you have to process all waiting files at 0600 on the first of the month, then create a Windows Scheduled Task that moves all waiting files from the drop off location to another folder where the File Adapter Receive Location is watching.

Leave the Receive Location Enabled all the time.

Important question: Do the files have to be processed in some particular order or one by one?  We can't any more advice until we know this.

August 31st, 2015 12:29pm

Ok, this can be very simple.

If you have to process all waiting files at 0600 on the first of the month, then create a Windows Scheduled Task that moves all waiting files from the drop off location to another folder where the File Adapter Receive Location is watching.

Leave the Receive Location Enabled all the time.

Important question: Do the files have to be processed in some particular order or one by one?  We can't any more advice until we know this.

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 12:29pm

If Order of files processing is not required then I would say boatseller approach  suits your requirement. 

Similar scenarios has been asked in forums multiple times and the response is to use a file I/O component to do the task

Thanks

Abhishek   

August 31st, 2015 1:33pm

Hi Prakash,

Is there secondary processing of the files or is it literally pick up data in files, and move that data to another resource such as SQL Server?

If so, then SQL Server Integration Services could well be a better fit for this and you can schedule when the package runs easily.

If you are simply moving files around, BizTalk is a very expensive file manager and something like a scheduled task would be a better solution.

If there is additional processing, then I'd definitely go with boatsellers solution of just leaving the receive location enabled and having a copy process.

Cheers,

Martin

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 8:31pm

Hi Prakash,

Is there secondary processing of the files or is it literally pick up data in files, and move that data to another resource such as SQL Server?

If so, then SQL Server Integration Services could well be a better fit for this and you can schedule when the package runs easily.

If you are simply moving files around, BizTalk is a very expensive file manager and something like a scheduled task would be a better solution.

If there is additional processing, then I'd definitely go with boatsellers solution of just leaving the receive location enabled and having a copy process.

Cheers,

Martin

September 1st, 2015 12:28am

Hi Prakash,

Is there secondary processing of the files or is it literally pick up data in files, and move that data to another resource such as SQL Server?

If so, then SQL Server Integration Services could well be a better fit for this and you can schedule when the package runs easily.

If you are simply moving files around, BizTalk is a very expensive file manager and something like a scheduled task would be a better solution.

If there is additional processing, then I'd definitely go with boatsellers solution of just leaving the receive location enabled and having a copy process.

Cheers,

Martin

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 12:28am

Hi Prakash,

Is there secondary processing of the files or is it literally pick up data in files, and move that data to another resource such as SQL Server?

If so, then SQL Server Integration Services could well be a better fit for this and you can schedule when the package runs easily.

If you are simply moving files around, BizTalk is a very expensive file manager and something like a scheduled task would be a better solution.

If there is additional processing, then I'd definitely go with boatsellers solution of just leaving the receive location enabled and having a copy process.

Cheers,

Martin

September 1st, 2015 12:28am

Hi Prakash,

Is there secondary processing of the files or is it literally pick up data in files, and move that data to another resource such as SQL Server?

If so, then SQL Server Integration Services could well be a better fit for this and you can schedule when the package runs easily.

If you are simply moving files around, BizTalk is a very expensive file manager and something like a scheduled task would be a better solution.

If there is additional processing, then I'd definitely go with boatsellers solution of just leaving the receive location enabled and having a copy process.

Cheers,

Martin

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 12:28am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics