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 OneWaySendPort() { Name = "SendPort"; SendPipeline = new SendPipeline <XmlTransmit>(); Transport.Adapter = new WcfWebHttpAdapter.Outbound(a => { a.Address = new("https://some.domain.com/service/api"); }); Transport.Host = "Send Host"; }
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); }
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; }
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"; }
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 TestReferencedSendPort() { Name = "MyTestReferencedSendPort"; SendPipeline = new SendPipeline <XmlTransmit>(); Transport.Adapter = new FileAdapter.Outbound(a => { a.DestinationFolder = @"c:\file"; }); Transport.Host = "host"; }
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); }
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; }
protected virtual PipelineRef CreateSendPipelineRef(SendPipeline sendPipeline) { var tp = PipelineRef.TransmitPipelineRef(); sendPipeline.Description.IfNotNullOrEmpty(d => tp.Description = d); tp.Name = ((ITypeDescriptor)sendPipeline).FullName; tp.FullyQualifiedName = ((ITypeDescriptor)sendPipeline).AssemblyQualifiedName; // TODO allow to change TackingOption tp.TrackingOption = PipelineTrackingTypes.None; return(tp); }
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); }
public void SendPipelineDslGrammarVariant5() { Skip.IfNot(BizTalkServerGroup.IsConfigured); // not fluent-DSL var pipeline = new SendPipeline <XmlTransmit>(); pipeline.Stages.PreAssemble.Component <FailedMessageRoutingEnablerComponent>().Enabled = false; pipeline.Stages.PreAssemble.Component <MicroPipelineComponent>().Components = new IMicroComponent[] { new XsltRunner { MapType = typeof(IdentityTransform) } }; pipeline.Stages.Assemble.Component <XmlAsmComp>().DocumentSpecNames = new() { new SchemaWithNone(SchemaMetadata.For <Any>().DocumentSpec.DocSpecStrongName), new SchemaWithNone(SchemaMetadata.For <soap_envelope_1__2.Envelope>().DocumentSpec.DocSpecStrongName) }; pipeline.Stages.Assemble.Component <XmlAsmComp>().AddXMLDeclaration = true; pipeline.Stages.Encode.Component <MicroPipelineComponent>().Components = new IMicroComponent[] { new XsltRunner { MapType = typeof(IdentityTransform) } }; var binding = pipeline.GetPipelineBindingInfoSerializer().Serialize(); // fluent-DSL fifth variant var pipeline5 = new SendPipeline <XmlTransmit>( pl => { pl.Stages.PreAssemble .ComponentAt <FailedMessageRoutingEnablerComponent>(0).Configure(c => { c.Enabled = false; }) .ComponentAt <MicroPipelineComponent>(1) .Configure(mpc => { mpc.Components = new IMicroComponent[] { new XsltRunner { MapType = typeof(IdentityTransform) } }; }); pl.Stages.Assemble.ComponentAt <XmlAsmComp>(0).Configure( c => { c.DocumentSpecNames = new() { new SchemaWithNone(SchemaMetadata.For <Any>().DocumentSpec.DocSpecStrongName), new SchemaWithNone(SchemaMetadata.For <soap_envelope_1__2.Envelope>().DocumentSpec.DocSpecStrongName) }; c.AddXMLDeclaration = true; }); pl.Stages.Encode.ComponentAt <MicroPipelineComponent>(0) .Configure(mpc => { mpc.Components = new IMicroComponent[] { new XsltRunner { MapType = typeof(IdentityTransform) } }; }); }); var binding5 = pipeline5.GetPipelineBindingInfoSerializer().Serialize(); binding5.Should().Be(binding); } [SkippableFact]
public TwoWaySendPort() { Name = nameof(TwoWaySendPort); Description = "Some Useless Two-Way Test Send Port"; SendPipeline = new SendPipeline <PassThruTransmit>(); ReceivePipeline = new ReceivePipeline <PassThruReceive>( pl => pl.Decoder <MicroPipelineComponent>( c => { c.Components = new IMicroComponent[] { new ContextBuilder { ExecutionTime = PluginExecutionTime.Deferred, BuilderType = typeof(DummyContextBuilder) } }; })); Transport.Adapter = new DummyAdapter(); Transport.Host = "Send Host Name"; }
public void SendPipelineSerializationKeepsOnlyStagesWhoseComponentsDefaultConfigHasBeenOverridden2() { Skip.IfNot(BizTalkServerGroup.IsConfigured); var pipeline = SendPipeline <XmlTransmit> .Configure( pl => pl .FirstPreAssembler <FailedMessageRoutingEnablerComponent>(c => { c.Enabled = false; }) .FirstPreAssembler <MicroPipelineComponent>( mpc => { mpc.Enabled = true; mpc.Components = new IMicroComponent[] { new XsltRunner { MapType = typeof(IdentityTransform) } }; })); var binding = pipeline.GetPipelineBindingInfoSerializer().Serialize(); binding.Should().Be( "<Root><Stages>" + "<Stage CategoryId=\"9d0e4101-4cce-4536-83fa-4a5040674ad6\">" + "<Components>" + $"<Component Name=\"{typeof(FailedMessageRoutingEnablerComponent).FullName}\">" + "<Properties>" + "<Enabled vt=\"11\">0</Enabled>" + "</Properties>" + "</Component>" + $"<Component Name=\"{typeof(MicroPipelineComponent).FullName}\">" + "<Properties>" + "<Components vt=\"8\">" + ( "<mComponents>" + $"<mComponent name='{typeof(XsltRunner).AssemblyQualifiedName}'>" + ( "<Encoding>utf-8</Encoding>" + $"<Map>{typeof(IdentityTransform).AssemblyQualifiedName}</Map>") + "</mComponent>" + "</mComponents>") + "</Components>" + "</Properties>" + "</Component>" + "</Components>" + "</Stage>" + "</Stages></Root>"); }
public TwoWayReceiveLocation() { Name = nameof(TwoWayReceiveLocation); Description = "Some Useless Two-Way Test Receive Location"; Enabled = false; ReceivePipeline = new ReceivePipeline <PassThruReceive>(); SendPipeline = new SendPipeline <PassThruTransmit>( pl => pl.PreAssembler <MicroPipelineComponent>( c => { c.Components = new IMicroComponent[] { new ContextBuilder { ExecutionTime = PluginExecutionTime.Deferred, BuilderType = typeof(DummyContextBuilder) } }; })); Transport.Adapter = new DummyAdapter(); Transport.Host = "Receive Host Name"; }
public OneWaySendPort() { Name = nameof(OneWaySendPort); Description = "Some Useless One-Way Test Send Port"; Filter = new(() => BtsProperties.MessageType == SchemaMetadata.For <soap_envelope_1__2.Envelope>().MessageType); Priority = Priority.Highest; OrderedDelivery = true; StopSendingOnOrderedDeliveryFailure = true; SendPipeline = new SendPipeline <PassThruTransmit>( pl => pl.PreAssembler <MicroPipelineComponent>( c => { c.Components = new IMicroComponent[] { new ContextBuilder { ExecutionTime = PluginExecutionTime.Deferred, BuilderType = typeof(DummyContextBuilder) } }; })); Transport.Adapter = new DummyAdapter(); Transport.Host = "Send Host Name"; Transport.RetryPolicy = new() { Count = 30, Interval = TimeSpan.FromMinutes(60) }; Transport.ServiceWindow = new() { StartTime = new(8, 0), StopTime = new(20, 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); }
public static IDslSerializer GetPipelineBindingInfoSerializer <T>(this SendPipeline <T> pipeline) where T : SendPipeline, new() { return(new PipelineBindingInfoSerializer(pipeline)); }