public PartSendPort()
     {
         Name         = SendPortName.Towards("Batch").About("Part").FormattedAs.Xml;
         State        = ServiceState.Started;
         SendPipeline = new SendPipeline <XmlTransmit>(
             pipeline => {
             pipeline.Encoder <MicroPipelineComponent>(
                 pc => {
                 pc.Components = new IMicroComponent[] {
                     new ContextBuilder {
                         BuilderType = typeof(ContextBuilders.Send.Batch.AggregateProcessResolver)
                     },
                     new ActivityTracker(),
                     new XsltRunner {
                         MapType = typeof(AnyToAddPart)
                     }
                 };
             });
         });
         Transport.Adapter = new WcfSqlAdapter.Outbound(
             a => {
             a.Address = new() {
                 InitialCatalog = "BizTalkFactoryTransientStateDb",
                 Server         = Platform.Settings.ProcessingDatabaseServer,
                 InstanceName   = Platform.Settings.ProcessingDatabaseInstance
             };
             a.IsolationLevel = IsolationLevel.ReadCommitted;
             a.StaticAction   = "TypedProcedure/dbo/usp_batch_AddPart";
         });
         Transport.Host        = Platform.Settings.HostResolutionPolicy;
         Transport.RetryPolicy = RetryPolicy.ShortRunning;
         Filter = new(() => BatchProperties.EnvelopeSpecName != null);
     }
 }
 public StandaloneSendPort()
 {
     Name              = SendPortName.Towards("Job").About("Notification").FormattedAs.Xml;
     SendPipeline      = new SendPipeline <PassThruTransmit>();
     Transport.Adapter = new FileAdapter.Outbound(a => { a.DestinationFolder = @"c:\file\drops"; });
     Transport.Host    = "Host";
 }
Beispiel #3
0
 public ReleaseSendPort()
 {
     Name         = SendPortName.Towards("Batch").About("Release").FormattedAs.Xml;
     State        = ServiceState.Started;
     SendPipeline = new SendPipeline <XmlTransmit>(
         pipeline => {
         pipeline.Encoder <MicroPipelineComponent>(
             pc => {
             pc.Components = new IMicroComponent[] {
                 new ContextBuilder {
                     BuilderType = typeof(ReleaseProcessResolver)
                 },
                 new ActivityTracker(),
                 new XsltRunner {
                     MapType = typeof(ReleaseToQueueControlledRelease)
                 }
             };
         });
     });
     Transport.Adapter = new WcfSqlAdapter.Outbound(
         a => {
         a.Address = new SqlAdapterConnectionUri {
             InitialCatalog = "BizTalkFactoryTransientStateDb",
             Server         = Platform.Settings.ProcessingDatabaseServer,
             InstanceName   = Platform.Settings.ProcessingDatabaseInstance
         };
         a.IsolationLevel = IsolationLevel.ReadCommitted;
         a.StaticAction   = "TypedProcedure/dbo/usp_batch_QueueControlledRelease";
     });
     Transport.Host        = Platform.Settings.TransmittingHost;
     Transport.RetryPolicy = RetryPolicy.ShortRunning;
     Filter = new Filter(() => BtsProperties.MessageType == Schema <Batch.Release> .MessageType);
 }
Beispiel #4
0
 public SinkFailedMessageSendPort()
 {
     Name         = SendPortName.Towards("Sink").About("FailedMessage").FormattedAs.None;
     State        = ServiceState.Started;
     SendPipeline = new SendPipeline <PassThruTransmit>(
         pipeline => {
         pipeline.PreAssembler <MicroPipelineComponent>(
             pc => {
             pc.Components = new IMicroPipelineComponent[] {
                 new ContextBuilder {
                     BuilderType = typeof(FailedProcessResolver)
                 },
                 new ActivityTracker(),
                 new MessageConsumer()
             };
         });
     });
     Transport.Adapter = new FileAdapter.Outbound(
         a => {
         a.DestinationFolder = @"C:\Files\Drops\BizTalk.Factory\Out";
         a.FileName          = "Failed_%MessageID%.xml";
     });
     Transport.Host        = CommonSettings.TransmitHost;
     Transport.RetryPolicy = RetryPolicy.RealTime;
     Filter = new Filter(() => ErrorReportProperties.ErrorType == "FailedMessage");
 }
 public BankSendPort()
 {
     Name              = SendPortName.Towards("Job").About("Anything").FormattedAs.Xml;
     SendPipeline      = new SendPipeline <PassThruTransmit>();
     Transport.Adapter = new FileAdapter.Outbound(a => { a.DestinationFolder = @"c:\file\drops"; });
     Transport.Host    = DummyHostResolutionPolicy.Default;
 }
Beispiel #6
0
 public ClaimCheckInSendPort()
 {
     Name         = SendPortName.Towards("Claim").About("CheckIn").FormattedAs.Xml;
     State        = ServiceState.Started;
     SendPipeline = new SendPipeline <XmlTransmit>(
         pipeline => {
         pipeline.Encoder <MicroPipelineComponent>(
             pc => {
             pc.Components = new IMicroPipelineComponent[] {
                 new ContextBuilder {
                     BuilderType = typeof(ProcessResolver)
                 },
                 new ActivityTracker(),
                 new XsltRunner {
                     MapType = typeof(ClaimToCheckIn)
                 }
             };
         });
     });
     Transport.Adapter = new WcfSqlAdapter.Outbound(
         a => {
         a.Address = new SqlAdapterConnectionUri {
             InitialCatalog = "BizTalkFactoryTransientStateDb",
             Server         = CommonSettings.ProcessingDatabaseHostName,
             InstanceName   = CommonSettings.ProcessingDatabaseInstanceName
         };
         a.IsolationLevel = IsolationLevel.ReadCommitted;
         a.StaticAction   = "TypedProcedure/dbo/usp_claim_CheckIn";
     });
     Transport.Host        = CommonSettings.TransmitHost;
     Transport.RetryPolicy = RetryPolicy.ShortRunning;
     Filter = new Filter(() => BtsProperties.MessageType == Schema <Claim.CheckIn> .MessageType);
 }
 public BankSendPort()
 {
     Name                  = SendPortName.Towards(Party.Bank).About(Subject.CreditNote).FormattedAs.Edi;
     SendPipeline          = new SendPipeline <XmlTransmit>();
     Transport.Adapter     = new FileAdapter.Outbound(a => { a.DestinationFolder = @"c:\file\drops"; });
     Transport.Host        = Host.SENDING_HOST;
     Transport.RetryPolicy = RetryPolicy.LongRunning;
     Filter                = new(() => BtsProperties.MessageType == SchemaMetadata.For <Any>().MessageType);
 }
Beispiel #8
0
 public TwoWaySoapSendPortStub()
 {
     Name                  = SendPortName.Towards("Stub").About("Message").FormattedAs.Xml;
     State                 = ServiceState.Started;
     SendPipeline          = new SendPipeline <XmlTransmit>();
     ReceivePipeline       = new ReceivePipeline <XmlReceive>();
     Transport.Adapter     = new WcfBasicHttpAdapter.Outbound(a => { a.Address = new EndpointAddress("http://localhost:8000/soap-stub"); });
     Transport.Host        = Platform.Settings.TransmittingHost;
     Transport.RetryPolicy = RetryPolicy.RealTime;
 }
 public UnitTestStubSendPort()
 {
     Name                  = SendPortName.Towards("UnitTest").About("Stub").FormattedAs.Xml;
     State                 = ServiceState.Started;
     SendPipeline          = new SendPipeline <XmlTransmit>();
     ReceivePipeline       = new ReceivePipeline <XmlReceive>();
     Transport.Adapter     = new WcfBasicHttpAdapter.Outbound(a => { a.Address = new EndpointAddress("http://localhost:8000/stubservice"); });
     Transport.Host        = CommonSettings.TransmitHost;
     Transport.RetryPolicy = RetryPolicy.RealTime;
 }
Beispiel #10
0
 public UnitTestBatchReleaseSendPort()
 {
     Name         = SendPortName.Towards("UnitTest.Batch").About("Release").FormattedAs.Xml;
     State        = ServiceState.Started;
     SendPipeline = new SendPipeline <PassThruTransmit>(
         pipeline => {
         pipeline.PreAssembler <MicroPipelineComponent>(
             pc => { pc.Components = new IMicroPipelineComponent[] { new ActivityTracker() }; });
     });
     Transport.Adapter     = new FileAdapter.Outbound(a => { a.DestinationFolder = @"C:\Files\Drops\BizTalk.Factory\Trace"; });
     Transport.Host        = CommonSettings.TransmitHost;
     Transport.RetryPolicy = RetryPolicy.RealTime;
     Filter = new Filter(() => BtsProperties.ReceivePortName == ApplicationBinding.ReceivePorts.Find <BatchReceivePort>().Name);
 }
 public ContentSendPortStub()
 {
     Name         = SendPortName.Towards("Stub").About("Content").FormattedAs.Xml;
     State        = ServiceState.Started;
     SendPipeline = new SendPipeline <PassThruTransmit>(
         pipeline => {
         pipeline.PreAssembler <MicroPipelineComponent>(
             pc => { pc.Components = new IMicroComponent[] { new ActivityTracker() }; });
     });
     Transport.Adapter     = new FileAdapter.Outbound(a => { a.DestinationFolder = @"C:\Files\Drops\BizTalk.Factory\Batch"; });
     Transport.Host        = Platform.Settings.HostResolutionPolicy;
     Transport.RetryPolicy = RetryPolicy.RealTime;
     Filter = new(() => BtsProperties.ReceivePortName == ApplicationBinding.ReceivePorts.Find <ContentReceivePort>().Name);
 }
Beispiel #12
0
 public UnitTestClaimRedeemSendPort()
 {
     Name         = SendPortName.Towards("UnitTest.Claim").About("Redeem").FormattedAs.Xml;
     State        = ServiceState.Started;
     SendPipeline = new SendPipeline <PassThruTransmit>(
         pipeline => {
         pipeline.PreAssembler <MicroPipelineComponent>(
             pc => {
             pc.Components = new IMicroPipelineComponent[] {
                 new ActivityTracker {
                     TrackingModes = ActivityTrackingModes.Claim
                 }
             };
         });
     });
     Transport.Adapter = new FileAdapter.Outbound(
         a => {
         a.DestinationFolder = @"C:\Files\Drops\BizTalk.Factory\Out";
         a.FileName          = "Claim_%MessageID%.xml";
     });
     Transport.Host        = CommonSettings.TransmitHost;
     Transport.RetryPolicy = RetryPolicy.RealTime;
     Filter = new Filter(() => BtsProperties.MessageType == Schema <Claim.CheckOut> .MessageType);
 }
Beispiel #13
0
 public BizTalkFactoryTestArtifactsBinding()
 {
     SendPorts.Add(
         _twoWaySendPort = SendPort(
             sp => {
         sp.Name              = SendPortName.Towards("TestArtifacts").About("Dummy").FormattedAs.None;
         sp.ReceivePipeline   = new ReceivePipeline <PassThruReceive>();
         sp.SendPipeline      = new SendPipeline <PassThruTransmit>();
         sp.State             = ServiceState.Unenlisted;
         sp.Transport.Adapter = new WcfSqlAdapter.Outbound(
             a => {
             a.Address = new SqlAdapterConnectionUri {
                 InitialCatalog = "BizTalkFactoryTransientStateDb",
                 Server         = CommonSettings.ProcessingDatabaseHostName,
                 InstanceName   = CommonSettings.ProcessingDatabaseInstanceName
             };
             a.StaticAction = "TypedProcedure/dbo/usp_batch_AddPart";
         });
         sp.Transport.Host = CommonSettings.TransmitHost;
     }),
         SendPort(
             sp => {
         sp.Name              = SendPortName.Towards("Service").About("Dummy").FormattedAs.None;
         sp.ReceivePipeline   = new ReceivePipeline <PassThruReceive>();
         sp.SendPipeline      = new SendPipeline <PassThruTransmit>();
         sp.Transport.Adapter = new WcfCustomAdapter.Outbound <BasicHttpBindingElement>(
             a => {
             a.Address = new EndpointAddress("https://services.stateless.be/soap/default");
             a.Binding.Security.Mode = BasicHttpSecurityMode.Transport;
             a.Binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
             a.EndpointBehaviors = new[] {
                 new ClientCredentialsElement {
                     ClientCertificate =
                     {
                         FindValue     = "*.stateless.be",
                         StoreLocation = StoreLocation.LocalMachine,
                         StoreName     = StoreName.My,
                         X509FindType  = X509FindType.FindBySubjectName
                     }
                 }
             };
             a.Identity = EndpointIdentityFactory.CreateCertificateIdentity(
                 StoreLocation.LocalMachine,
                 StoreName.TrustedPeople,
                 X509FindType.FindBySubjectDistinguishedName,
                 "*.services.party.be");
         });
         sp.Transport.Host = CommonSettings.TransmitHost;
     }));
     ReceivePorts.Add(
         _twoWayReceivePort = ReceivePort(
             rp => {
         rp.Name = ReceivePortName.Offwards("TestArtifacts");
         rp.ReceiveLocations.Add(
             ReceiveLocation(
                 rl => {
             rl.Name              = ReceiveLocationName.About("Dummy").FormattedAs.None;
             rl.Enabled           = false;
             rl.ReceivePipeline   = new ReceivePipeline <PassThruReceive>();
             rl.SendPipeline      = new SendPipeline <PassThruTransmit>();
             rl.Transport.Adapter = new WcfNetTcpAdapter.Inbound(a => { a.Address = new EndpointAddress("net.tcp://localhost/dummy.svc"); });
             rl.Transport.Host    = CommonSettings.ReceiveHost;
         }));
     }));
 }
 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;
     //		}));
 }