public SampleApplication()
 {
     Name = ApplicationName.Is("Simple.SampleApplication");
     SendPorts.Add(UnitTestSendPort);
     SendPorts.Add(new StandaloneSendPort());
     ReceivePorts.Add(BatchReceivePort);
     ReceivePorts.Add(new StandaloneReceivePort());
     Timestamp = XmlConvert.ToDateTime("2015-02-17T22:51:04+01:00", XmlDateTimeSerializationMode.Local);
 }
 public ApplicationBinding()
 {
     Name        = ApplicationName.Is("BizTalk.Factory.Batching");
     Description = "BizTalk.Factory's BizTalk Server Batching Application.";
     ReceivePorts.Add(new ContentReceivePort());
     SendPorts.Add(
         new PartSendPort(),
         new ReleaseSendPort());
 }
Ejemplo n.º 3
0
 public ApplicationBinding()
 {
     Name        = ApplicationName.Is("BizTalk.Factory.Activity.Tracking");
     Description = "BizTalk.Factory's activity model and tracking API for general purpose BizTalk Server development.";
     ReceivePorts.Add(new ClaimReceivePort());
     SendPorts.Add(
         new ClaimCheckInSendPort(),
         new FailedMessageSinkPort());
 }
 public BizTalkFactoryApplicationBinding()
 {
     Name        = ApplicationName.Is(BizTalkFactorySettings.APPLICATION_NAME);
     Description = "Library to speed up the development of BizTalk Server applications.";
     ReceivePorts.Add(
         new BatchReceivePort(),
         new ClaimReceivePort());
     SendPorts.Add(
         new BatchAddPartSendPort(),
         new BatchQueueControlledReleaseSendPort(),
         new ClaimCheckInSendPort(),
         new SinkFailedMessageSendPort());
 }
 public SampleApplication()
 {
     Name = ApplicationName.Is("Detailed.SampleApplication");
     ReceivePorts.Add(
         CustomerOneWayReceivePort = ReceivePort(
             p => {
         p.Name = ReceivePortName.Offwards(Party.Customer);
         p.ReceiveLocations
         .Add(
             ReceiveLocation(
                 l => {
             l.Name              = ReceiveLocationName.About(Subject.Invoice).FormattedAs.Xml;
             l.Enabled           = false;
             l.ReceivePipeline   = new ReceivePipeline <XmlReceive>();
             l.Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\file\drops"; });
             l.Transport.Host    = Host.RECEIVING_HOST;
         }),
             ReceiveLocation(
                 l => {
             l.Name              = ReceiveLocationName.About(Subject.CreditNote).FormattedAs.Edi;
             l.Enabled           = false;
             l.ReceivePipeline   = new ReceivePipeline <XmlReceive>();
             l.Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\file\drops"; });
             l.Transport.Host    = Host.RECEIVING_HOST;
         })
             );
     }),
         CustomerTwoWayReceivePort = ReceivePort(
             p => {
         p.Name        = ReceivePortName.Offwards(Party.Customer);
         p.Description = "Receives ledgers from customers";
         p.ReceiveLocations.Add(
             ReceiveLocation(
                 l => {
             l.Name              = ReceiveLocationName.About(Subject.Statement).FormattedAs.Csv;
             l.Enabled           = true;
             l.ReceivePipeline   = new ReceivePipeline <PassThruReceive>(pl => { pl.Decoder <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; }); });
             l.SendPipeline      = new SendPipeline <PassThruTransmit>(pl => { pl.PreAssembler <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; }); });
             l.Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\file\drops"; });
             l.Transport.Host    = Host.RECEIVING_HOST;
         }));
     }),
         ReceivePort(
             p => {
         p.Name        = ReceivePortName.Offwards(Party.Bank);
         p.Description = "Receives financial movements from bank";
         p.ReceiveLocations.Add(
             ReceiveLocation(
                 l => {
             l.Name            = ReceiveLocationName.About(Subject.Statement).FormattedAs.Xml;
             l.Enabled         = true;
             l.ReceivePipeline = new ReceivePipeline <XmlReceive>(
                 pl => {
                 pl.Decoder <MicroPipelineComponent>(
                     c => {
                     c.Enabled    = false;
                     c.Components = new IMicroComponent[] {
                         new FailedMessageRoutingEnabler {
                             EnableFailedMessageRouting = true, SuppressRoutingFailureReport = false
                         },
                         new ContextPropertyExtractor {
                             Extractors = new(new ConstantExtractor(BizTalkFactoryProperties.OutboundTransportLocation, TargetEnvironment.ACCEPTANCE))
                         }
                     };
                 });
             });
             l.Transport.Adapter = new WcfSqlAdapter.Inbound(
                 a => {
                 a.Address = new() { InboundId = "FinancialMovements", InitialCatalog = "BankDb", Server = "localhost" };
                 a.InboundOperationType         = InboundOperation.XmlPolling;
                 a.PolledDataAvailableStatement = "select count(1) from data";
                 a.PollingStatement             = "select * from data for XML";
                 a.PollingInterval    = TimeSpan.FromHours(2);
                 a.PollWhileDataFound = true;
             });
             l.Transport.Host = Host.RECEIVING_HOST;
         }));
     }),
         TaxAgencyOneWayReceivePort = new()
         );
     SendPorts.Add(
         BankOneWaySendPort     = new(),
         CustomerTwoWaySendPort = SendPort(
             p => {
         p.Name                  = SendPortName.Towards(Party.Customer).About(Subject.Statement).FormattedAs.Csv;
         p.SendPipeline          = new SendPipeline <PassThruTransmit>(pl => { pl.PreAssembler <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; }); });
         p.ReceivePipeline       = new ReceivePipeline <PassThruReceive>(pl => { pl.Decoder <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; }); });
         p.Transport.Adapter     = new FileAdapter.Outbound(a => { a.DestinationFolder = @"c:\file\drops"; });
         p.Transport.RetryPolicy = RetryPolicy.LongRunning;
         p.Transport.Host        = Host.SENDING_HOST;
     })
         );
     // TODO Orchestrations.Add(
     //	new ProcessOrchestrationBinding(
     //		o => {
     //			o.ReceivePort = CustomerOneWayReceivePort;
     //			o.RequestResponsePort = CustomerTwoWayReceivePort;
     //			o.SendPort = BankOneWaySendPort;
     //			o.SolicitResponsePort = CustomerTwoWaySendPort;
     //			o.Host = Host.PROCESSING_HOST;
     //		}));
 }