Getting the same file name from two BizTalk send ports

311 views Asked by At

In BizTalk 2016, we are planning something where there is a set of send ports. One going to our backup. The other is going to archive. The backup send port is already created. Its file name has to be “ExampleText%MessageID%.xml” without quotes. Unfortunately, this won’t give us the exact name in both file locations, because %MessageID% is a randomized generated information.

We are going to make a code to compare if the file name of each file in the backup is the same as in the archive folder to check to see if everything is there. Is there any way that we can go this route of using two send ports and getting the exact name in both locations?

Along with that, we have another set where the backup send port has to have the file name “%SourceFileName%_%datetime%” without quotes. My fear is that one send port will be delayed where the %datetime% is different. My boss wants to go this direction instead of creating an automated script to move files over. Any advice would be very helpful.

1

There are 1 answers

0
Dijkgraaf On

You need to set the desired filename before it hits the Send Ports via the BTS.ReceivedFileName property and then you can use the %SourceFileName% macro on both ports.

You can either set this property in an Orchestration, or you need to set it in a pipeline component in the Receive Location. I would tend to use the BRE Pipeline Framework for this, but you can write your own custom component.