Sequential File Processing of files in Biztalk

Hi All,

I have requirement from the vendor.

I have 2 different files(A & B) that i am receiving in 2 different file folders location(C & D) in FTP server resp.I need to pass the files to SAP through an RFC.

I have created 2 different orchestrations and doing the work fine.

Now, the new requirement is that i should only pick the file B from the location(D) after receiving the successful response for file A execution.

The sequential convey method limits to only one receive port. But in my case, I have 2 different receive location.

Any solutions

January 20th, 2015 10:35am

File A from Location C

File B from Location D

File B to pe picked up if response for file A from C is success.

One way to achive is Keep having two orchestration and enable disable the receive location for B based on resposne of A.

Free Windows Admin Tool Kit Click here and download it now
January 20th, 2015 11:11am

Hi,

Try to do this in one orchestration, after you process file A and have a successful response pick the file B.

January 20th, 2015 11:16am

Hi,

The external vendor drops the both the files at the same time on both the locations and i have enabled both the receive port.

To achieve in one orchestration, i have to make 2 different receive port.But, how to make a correlation between the two receive port.

Both receive port have different message files and no common element to correlation it.

Free Windows Admin Tool Kit Click here and download it now
January 20th, 2015 12:05pm

Hi,

Just wondering if both files are different and no common element to co-relate then why is the processing dependent on first one's response, what is the frequency of these files. I still feel it can be done in one process.

January 20th, 2015 12:59pm

The processing at SAP end for file B needs the success of file A first.

This is why they want Biztalk to do it.

How to achieve in one orchestration. Can you help in few details ?

I have one receive port,receive shape, transform shape, send shape(SAP adapter) and receive shape(response from SAP) for one process and same for the other.

How to combine the two process ? 

Free Windows Admin Tool Kit Click here and download it now
January 20th, 2015 1:12pm

Hi,

At the end of the first process start the second by start orchestration or the second receive can be in the first orchestration only, you will have to co-relate them however.

January 20th, 2015 1:36pm

How to start the second orchestration ? I am not able to get .

The first receive is Activated.

The second receive is after the first send port block.

Free Windows Admin Tool Kit Click here and download it now
January 20th, 2015 1:58pm

Hi,

use the start shape.

January 20th, 2015 2:24pm

You can have a some sequential processing here :)

1) First Orchestration will pick up file for location D and after you have received the file poll the required location for the file exits or not with a helper method like below

System.IO.File.Exists(path)

Once  you find the required file then call a callable Orchestration which will pick up file for your location C .

Trick here : Make second Orchestration callable one and call it from parent Orchestration

Thanks

Abhishek

 
Free Windows Admin Tool Kit Click here and download it now
January 20th, 2015 2:58pm

Hi,

You suggested making a single orchestration, so if i use the start orchestration block after the completion of first process, what to write in the Called orchestration property of the shape ?

Because we are doing it in the same orchestration only ?

January 20th, 2015 3:02pm

Hi,

You suggested making a single orchestration, so if i use the start orchestration block after the completion of first process, what to write in the Called orchestration property of the shape ?

Because we are doing it in the same orchestration only ?

Ops this approach will work  now :) and easy to understand as well  

1) Define a Correlation set based on your BTS.ReceivePortName  inside your Orchestration .

2) Create two different receive location for SFTP adapter with same receive port  pointing to different SFTP location for C and D types of file .

3)now coming to Orchestration first receive shape will poll data for type D files and will have to initialize the Correlation property

4) Once file received from SFTP location you can have a send shape to send to your D location

5) Have another receive shape with following Correlation of type BTS.ReceivePortName already defined  which will again poll the data from your SFTP location

.6) Have a send shape to send the newly got files to C location .

Hope this will clear your idea this time :)

  Thanks

Abhishek


Free Windows Admin Tool Kit Click here and download it now
January 20th, 2015 3:19pm

Hi,

You suggested making a single orchestration, so if i use the start orchestration block after the completion of first process, what to write in the Called orchestration property of the shape ?

Because we are doing it in the same orchestration only ?

Ops this approach will work  now :) and easy to understand as well  

1) Define a Correlation set based on your BTS.ReceivePortName  inside your Orchestration .

2) Create two different receive location for SFTP adapter with same receive port  pointing to different SFTP location for C and D types of file .

3)now coming to Orchestration first receive shape will poll data for type D files and will have to initialize the Correlation property

4) Once file received from SFTP location you can have a send shape to send to your D location

5) Have another receive shape with following Correlation of type BTS.ReceivePortName already defined  which will again poll the data from your SFTP location

.6) Have a send shape to send the newly got files to C location .

Hope this will clear your idea this time :)

  Thanks

Abhishek


January 20th, 2015 3:19pm

Hi Abhishek,

Scenario is 

File A from Location C. File B from Location D

File B to be picked up if response for file A from C is success.

You want me to make 2 orchestrations to achieve it or just 1.

Free Windows Admin Tool Kit Click here and download it now
January 20th, 2015 3:56pm

If the files come in pairs, you would use a Parallel Convoy.

Both would be received by the Orchestration but you would always process file A first, then based on that result, do whatever you need with the File B message.

This works best if there's a way to link the two files.

January 20th, 2015 4:53pm

Hi Abhishek,

Scenario is 

File A from Location C. File B from Location D

File B to be picked up if response for file A from C is success.

You want me to make 2 orchestrations to achieve it or just 1.

It can be done in once :) Steps already mentioned above . There is dependency of flow so better to have a sequential process with Correlation

Thanks

Abhishek

 
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2015 8:53am

Hi Abhishek,

You want to have 2 operations on the  receive port or single operation ?

Because both files execution are different.

January 22nd, 2015 11:27am

If the files are directly related to each other, meaning they share an ID or some other value, use a Parallel Convoy.
Free Windows Admin Tool Kit Click here and download it now
January 22nd, 2015 3:07pm

If the files are directly related to each other, meaning they share an ID or some other value, use a Parallel Convoy.
January 22nd, 2015 3:07pm

I strongly agree with Johns.

The File transport is not good for sequencing and Parallel convoy helps in this.

Imagine situation: Source system creates: A1, B1, A2, B2,... and creates them almost simultaneously in A and B folders.

Receive locations pick up files and File transport does not support ordered delivery. That means, files could be consumed in batches without order inside batches.

As result, the messages are consumed by MessageBox in this sequence: A2, B1, A1, B2.

If we use a Sequential convoy, we got successfull A2->B2 convoy, suspended B1 and A1 convoy which never finished.

If we use Parallel convoy, we got: A2-B2 and B1-A2 all successfull convoys.

Free Windows Admin Tool Kit Click here and download it now
January 23rd, 2015 1:04am

Hi Abhishek,

I tried the above mentioned approach.I created one receive port and 2 receive location and made the BTS.ReceivePortName as the correlation property.

But I am unable to transfer the files as it show" no subscriber found for the message".

Please help

January 27th, 2015 8:56am

Hi Leonid,

The two files A & B are different files with no common entity(elements inside the file) to correlate them.

How to achieve a parallel convey mechanism then ?

Free Windows Admin Tool Kit Click here and download it now
January 27th, 2015 9:06am

Hi Anant,

Please, follow the classic description from Convoy Deep Dive article by Stephen W. Thomas.

You are trying to correlate messages, that means there is something that should correlate them. It can be something in content of the message or something in the message context, like URL or name of the file or time interval or...

If there is nothing to correlate, then you don't have to create a convoy! That means you have to redesign your solution.

Forget about technical implementation and think again, what links A and B?

January 27th, 2015 7:43pm

Hi Leonid,

My primary requirement still remains a solution where i have 2 independent orchestrations(each orchestrations processing different files) and i just want one orchestration to be called only after my first orchestration is over and successful.

Can you suggest something related to this lines ??

Free Windows Admin Tool Kit Click here and download it now
January 28th, 2015 1:52pm

The likely best solution to this scenario is a Parallel Convoy

The Parallel Convoy is covered in the Deep Dive mentioned above.

You would process File A right after it's Receive Shape, still in the Parallel Shape.  File B would be processed after the Parallel Shape, consequently, after File A.  You can add whatever checks/verification you want.

January 28th, 2015 5:00pm

Hi Leonid,

My primary requirement still remains a solution where i have 2 independent orchestrations(each orchestrations processing different files) and i just want one orchestration to be called only after my first orchestration is over and successful.

Can you suggest something related to this lines ??

Use a message from first orch to start the second orch. Use partner ports for this. The second orch picks up the second file. Something like that.
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2015 7:02pm

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

Other recent topics Other recent topics