Вы можете динамически создать местоположение приема ФАЙЛА (или FTP) в оркестровке, которая активируется портом получения WCF.
Brian Loesgen blogged простой пример кода, который может быть вызван вашей оркестровкой для создания мест получения. Если имена серверов и папок не меняются от одного вызова к другому, вы можете каждый раз использовать одно и то же место приема и просто активировать / деактивировать его во время выполнения.
Вот еще один вопрос переполнения стека, в котором конкретно рассматривается активация местоположения получения в коде: Есть ли способ автоматизировать включение или выключение местоположения получения BizTalk с помощью кода?
Создайте новый проект класса в Visual Studio, добавьте ссылку на Microsoft.BizTalk.ExplorerOM, напишите несколько строк кода, и вы получите свою вспомогательную сборку!
Вот пример из MSDN для создания и настройки местоположения приема HTTP:
private void CreateAndConfigureReceiveLocation()
{
BtsCatalogExplorer root = new BtsCatalogExplorer();
try
{
root.ConnectionString = "Server=.;Initial Catalog=BizTalkMgmtDb;Integrated Security=SSPI;";
//First, create a new one way receive port.
ReceivePort myreceivePort = root.AddNewReceivePort(false);
//Note that if you dont set the name property for the receieve port,
//it will create a new receive location and add it to the receive //port.
myreceivePort.Name = "My Receive Port";
//Create a new receive location and add it to the receive port
ReceiveLocation myreceiveLocation = myreceivePort.AddNewReceiveLocation();
foreach(ReceiveHandler handler in root.ReceiveHandlers)
{
if(handler.TransportType.Name == "HTTP")
{
myreceiveLocation.ReceiveHandler = handler;
break;
}
}
//Associate a transport protocol and URI with the receive location.
foreach (ProtocolType protocol in root.ProtocolTypes)
{
if(protocol.Name == "HTTP")
{
myreceiveLocation.TransportType = protocol;
break;
}
}
myreceiveLocation.Address = "/home";
//Assign the first receive pipeline found to process the message.
foreach(Pipeline pipeline in root.Pipelines)
{
if(pipeline.Type == PipelineType.Receive)
{
myreceiveLocation.ReceivePipeline = pipeline;
break;
}
}
//Enable the receive location.
myreceiveLocation.Enable = true;
myreceiveLocation.FragmentMessages = Fragmentation.Yes;//optional property
myreceiveLocation.ServiceWindowEnabled = false; //optional property
//Try to commit the changes made so far. If the commit fails,
//roll-back all changes.
root.SaveChanges();
}
catch(Exception e)
{
root.DiscardChanges();
throw e;
}
}