public UnitTestClaimDeskXmlReceiveLocation() { Name = ReceiveLocationName.About("Claim.Desk").FormattedAs.Xml; Enabled = true; ReceivePipeline = new ReceivePipeline <XmlReceive>( pipeline => { pipeline.Validator <MicroPipelineComponent>( pc => { pc.Components = new IMicroPipelineComponent[] { new ContextPropertyExtractor { Extractors = new[] { new XPathExtractor(BizTalkFactoryProperties.CorrelationToken, "/*[local-name()='Any']/*[local-name()='CorrelationToken']"), new XPathExtractor(BizTalkFactoryProperties.EnvironmentTag, "/*[local-name()='Any']/*[local-name()='EnvironmentTag']"), new XPathExtractor(BizTalkFactoryProperties.OutboundTransportLocation, "/*[local-name()='Any']/*[local-name()='OutboundTransportLocation']"), new XPathExtractor(BizTalkFactoryProperties.ReceiverName, "/*[local-name()='Any']/*[local-name()='ReceiverName']"), new XPathExtractor(BizTalkFactoryProperties.SenderName, "/*[local-name()='Any']/*[local-name()='SenderName']"), new XPathExtractor(TrackingProperties.Value1, "/*[local-name()='Any']/*[local-name()='CorrelationToken']"), new XPathExtractor(TrackingProperties.Value2, "/*[local-name()='Any']/*[local-name()='ReceiverName']"), new XPathExtractor(TrackingProperties.Value3, "/*[local-name()='Any']/*[local-name()='SenderName']") } }, new ActivityTracker { TrackingModes = ActivityTrackingModes.Claim } }; }); }); Transport.Adapter = new FileAdapter.Inbound( a => { a.FileMask = "*.xml.claim"; a.ReceiveFolder = @"C:\Files\Drops\BizTalk.Factory\In"; }); Transport.Host = CommonSettings.ReceiveHost; }
public StandaloneReceiveLocation() { Name = ReceiveLocationName.About("AddPart").FormattedAs.Xml; ReceivePipeline = new ReceivePipeline <PassThruReceive>(); Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\file\drops"; }); Transport.Host = "Host"; }
public TaxAgencyReceivePort() { Name = ReceivePortName.Offwards(Party.TaxAgency); ReceiveLocations.Add( ReceiveLocation( l => { l.Name = ReceiveLocationName.About(Subject.Statement).FormattedAs.Xml; l.Enabled = false; l.ReceivePipeline = new ReceivePipeline <PassThruReceive>( pl => { pl.Decoder <MicroPipelineComponent>( c => { c.Components = new IMicroComponent[] { new ContextBuilder { BuilderType = typeof(IContextBuilder), ExecutionTime = PluginExecutionTime.Deferred } }; }); }); l.Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\file\drops"; }); l.Transport.Host = Host.ISOLATED_HOST; l.Transport.Schedule = new() { StartDate = new(2015, 2, 17), StopDate = new DateTime(2015, 2, 17).AddDays(12), ServiceWindow = new DailyServiceWindow { Interval = 10, From = new(2020, 1, 30), StartTime = new(13, 15), StopTime = new(14, 15) } }; }) ); }
public BankReceiveLocation() { Name = ReceiveLocationName.About("AddPart").FormattedAs.Xml; ReceivePipeline = new ReceivePipeline <PassThruReceive>(); Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\file\drops"; }); Transport.Host = DummyHostResolutionPolicy.Default; }
public TaxAgencyReceivePort() { Name = ReceivePortName.Offwards(Party.TaxAgency); ReceiveLocations.Add( ReceiveLocation( l => { l.Name = ReceiveLocationName.About(MessageName.Statement).FormattedAs.Xml; l.Enabled = false; l.ReceivePipeline = new ReceivePipeline <PassThruReceive>( pl => { pl.Decoder <PolicyRunnerComponent>( c => { c.Enabled = true; c.ExecutionMode = PluginExecutionMode.Deferred; c.Policy = Policy <Policies.Send.Claim.ProcessResolver> .Name; }); }); l.Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\files\drops"; }); l.Transport.Host = Host.ISOLATED_HOST; l.Transport.Schedule = new Schedule { StartDate = new DateTime(2015, 2, 17), StopDate = new DateTime(2015, 2, 17).AddDays(12), ServiceWindow = new ServiceWindow { StartTime = new Time(13, 15), StopTime = new Time(14, 15) } }; }) ); }
public PartReceiveLocationStub() { Name = ReceiveLocationName.About("Part").FormattedAs.Xml; Enabled = true; ReceivePipeline = new ReceivePipeline <XmlReceive>( pipeline => { pipeline.Validator <MicroPipelineComponent>( pc => { pc.Components = new IMicroComponent[] { new ContextPropertyExtractor { Extractors = new[] { new XPathExtractor(BatchProperties.EnvelopeSpecName, "/*[local-name()='Any']/*[local-name()='EnvelopeSpecName']", ExtractionMode.Promote), new XPathExtractor(BatchProperties.EnvelopePartition, "/*[local-name()='Any']/*[local-name()='EnvelopePartition']"), new XPathExtractor(TrackingProperties.Value1, "/*[local-name()='Any']/*[local-name()='EnvelopeSpecName']"), new XPathExtractor(TrackingProperties.Value2, "/*[local-name()='Any']/*[local-name()='EnvironmentTag']"), new XPathExtractor(TrackingProperties.Value3, "/*[local-name()='Any']/*[local-name()='EnvelopePartition']") } }, new ActivityTracker() }; }); }); Transport.Adapter = new FileAdapter.Inbound( a => { a.FileMask = "*.xml.part"; a.ReceiveFolder = @"C:\Files\Drops\BizTalk.Factory\In"; }); Transport.Host = Platform.Settings.ReceivingHost; }
public BankReceiveLocation() { Name = ReceiveLocationName.About("AddPart").FormattedAs.Xml; ReceivePipeline = new ReceivePipeline <BatchReceive>(); Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"c:\files\drops"; }); Transport.Host = "Host"; }
public OneWayReceiveLocationStub() { Name = ReceiveLocationName.About("Message").FormattedAs.Xml; Enabled = true; ReceivePipeline = new ReceivePipeline <XmlReceive>( pipeline => { pipeline.Validator <MicroPipelineComponent>( pc => { pc.Components = new IMicroComponent[] { new ContextPropertyExtractor(), new ActivityTracker() }; }); }); Transport.Adapter = new FileAdapter.Inbound(a => { a.ReceiveFolder = @"C:\Files\Drops\BizTalk.Factory\In"; }); Transport.Host = Platform.Settings.ReceivingHost; }
public BatchReceiveLocation() { Name = ReceiveLocationName.About("Release").FormattedAs.Xml; Enabled = true; ReceivePipeline = new ReceivePipeline <PassThruReceive>( pipeline => { pipeline.Decoder <MicroPipelineComponent>( pc => { pc.Components = new IMicroPipelineComponent[] { new BatchTracker(), new EnvelopeBuilder(), new ContextPropertyExtractor() }; }); }); Transport.Adapter = new WcfSqlAdapter.Inbound( a => { a.Address = new SqlAdapterConnectionUri { InboundId = "AvailableBatches", InitialCatalog = "BizTalkFactoryTransientStateDb", Server = CommonSettings.ProcessingDatabaseHostName, InstanceName = CommonSettings.ProcessingDatabaseInstanceName }; a.PolledDataAvailableStatement = "SELECT COUNT(1) FROM vw_batch_NextAvailableBatch"; a.PollingStatement = "EXEC usp_batch_ReleaseNextBatch"; a.PollingInterval = BatchReleasePollingInterval; a.PollWhileDataFound = true; a.InboundOperationType = InboundOperation.XmlPolling; a.XmlStoredProcedureRootNodeName = "BodyWrapper"; a.InboundBodyLocation = InboundMessageBodySelection.UseBodyPath; a.InboundBodyPathExpression = "/BodyWrapper/*"; a.InboundNodeEncoding = MessageBodyFormat.Xml; a.ServiceBehaviors = new[] { new SqlAdapterInboundTransactionBehavior { TransactionIsolationLevel = IsolationLevel.ReadCommitted, TransactionTimeout = TimeSpan.FromMinutes(2) } }; }); Transport.Host = CommonSettings.ReceiveHost; }
public UnitTestClaimDeskAnyReceiveLocation() { Name = ReceiveLocationName.About("Claim.Desk").FormattedAs.None; Enabled = true; ReceivePipeline = new ReceivePipeline <PassThruReceive>( pipeline => { pipeline.Decoder <MicroPipelineComponent>( pc => { pc.Components = new IMicroPipelineComponent[] { new ActivityTracker { TrackingModes = ActivityTrackingModes.Claim } }; }); }); Transport.Adapter = new FileAdapter.Inbound( a => { a.FileMask = "*.bin.claim"; a.ReceiveFolder = @"C:\Files\Drops\BizTalk.Factory\In"; }); Transport.Host = CommonSettings.ReceiveHost; }
public ClaimReceiveLocation() { Name = ReceiveLocationName.About("CheckOut").FormattedAs.Xml; Enabled = true; ReceivePipeline = new ReceivePipeline <XmlReceive>( pipeline => { pipeline.Validator <MicroPipelineComponent>( pc => { pc.Components = new IMicroComponent[] { new ContextPropertyExtractor(), new ActivityTracker() }; }); }); Transport.Adapter = new WcfSqlAdapter.Inbound( a => { a.Address = new SqlAdapterConnectionUri { InboundId = "AvailableTokens", InitialCatalog = "BizTalkFactoryTransientStateDb", Server = Platform.Settings.ProcessingDatabaseServer, InstanceName = Platform.Settings.ProcessingDatabaseInstance }; a.PolledDataAvailableStatement = "SELECT COUNT(1) FROM vw_claim_AvailableTokens"; a.PollingStatement = "EXEC usp_claim_CheckOut"; a.PollingInterval = ClaimCheckOutPollingInterval; a.InboundOperationType = InboundOperation.XmlPolling; a.XmlStoredProcedureRootNodeName = "BodyWrapper"; a.InboundBodyLocation = InboundMessageBodySelection.UseBodyPath; a.InboundBodyPathExpression = "/BodyWrapper/*"; a.InboundNodeEncoding = MessageBodyFormat.Xml; a.ServiceBehaviors = new[] { new SqlAdapterInboundTransactionBehavior { TransactionIsolationLevel = IsolationLevel.ReadCommitted, TransactionTimeout = TimeSpan.FromMinutes(2) } }; }); Transport.Host = Platform.Settings.ReceivingHost; }
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; // })); }