首页 > 解决方案 > 如何在 biztalk 中重新利用用于文件接收位置的相同编排和管道设置 POP3 接收位置?

问题描述

我想发送带有 csv 附件的电子邮件,并让它们通过 POP3 挑选,映射并由 biztalk 放入 SQL 数据库。

我有一个选择文件的文件接收位置。

接收位置属性:

文件位置属性

管道配置

管道配置 1 管道配置 2

我将文件粘贴到文件夹中。

文件已删除

该文件由 biztalk 挑选。

文件已删除

显示正在处理的文件的日志:

    Timestamp: 5/9/2018 10:48:20 AM Message: <ns0:Request 
xmlns:ns0='http://ABC.MW.BackEnds.sp_MW_InformacaoTransaccaoSQL'> 
<ns1:sp_MW_InformacaoTransaccoes 
xmlns:ns1='http://schemas.microsoft.com/Sql/2008/05/TypedProcedures/dbo'> 
<ns1:codEstado>1</ns1:codEstado> <ns1:ficheiroNome>C:\XYZ\TransacFecho\NoErrors-
a.csv</ns1:ficheiroNome> <ns1:numLinhas>0</ns1:numLinhas> 
<ns1:Debug>false</ns1:Debug> </ns1:sp_MW_InformacaoTransaccoes> </ns0:Request> 
Category: General Priority: 1 EventId: 0 Severity: Information Title: Machine: 
CORE04 Application Domain: __XDomain_3.0.1.0_0 Process Id: 44997 Process Name: 
C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2\BTSNTSvc.exe Win32 
Thread Id: 952 Thread Name: Extended Properties:

数据在映射后插入到数据库中。

数据被放置在数据库中

我创建了一个类似于文件接收位置的电子邮件位置。

邮件属性。

邮件接收位置属性

POP3 属性。

POP3 属性

管道配置。

管道配置 1 管道配置 2

我通过邮件测试相同的 csv 文件。

已收到附有文件的邮件。

收到文件的邮件

邮件由 biztalk 处理和删除。

带有被 bitztalk 删除文件的邮件

我得到的错误。

    Timestamp: 5/9/2018 2:39:47 PM Message: 
Microsoft.XLANGs.Core.PersistenceException: Exception occurred when persisting 
state to the database. ---> 
Microsoft.BizTalk.XLANGs.BTXEngine.PersistenceItemException: A batch item failed 
persistence Item-ID c99ae447-8f55-4589-9003-012e6bc599ad OperationType 
MAIO_CommitBatch Status -1061151998 ErrorInfo The published message could not be
 routed because no subscribers were found. . ---> 
Microsoft.BizTalk.XLANGs.BTXEngine.PublishMessageException: Failed to publish 
(send) a message in the batch. This is usually because there is no one expecting 
to receive this message. The error was The published message could not be routed 
because no subscribers were found. with status -1061151998. --- End of inner 
exception stack trace --- --- End of inner exception stack trace --- at 
Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit() at 
Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean 
idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate) at 
Microsoft.XLANGs.Core.LongRunningTransaction.PendingCommit(Boolean ignore, 
XMessage msg) at Microsoft.XLANGs.Core.Service.PendingCommit(Boolean ignore, 
XMessage msg) at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean 
ignore, XMessage msg) at 
Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean 
ignoreCommit, XMessage msg) at 
Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean 
ignoreCommit, XMessage msg) at 
Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation, 
XLANGMessage msg, Correlation[] initCorrelations, Correlation[] 
followCorrelations, Context cxt, Segment seg, ActivityFlags flags) at 
XYZ.Middleware.Core.Bts.Orchestrations.oProcessSelectorPublisher.segment2(S
topConditions stopOn) at 
Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions 
stopCond, Exception& exp) Category: Critical Priority: 4 EventId: 0 Severity: 
Critical Title: Machine: CORE04 Application Domain: __XDomain_3.0.1.0_0 Process 
Id: 44998 Process Name: C:\Program Files (x86)\Microsoft BizTalk Server 2013 
R2\BTSNTSvc.exe Win32 Thread Id: 5792 Thread Name: Extended Properties: 

Edit1:我通过停止编排来截获通过POP3获得的biztalk中的消息,并将其与通过文件位置获得的消息进行比较。

电子邮件: Biztalk 消息电子邮件

档案讯息: Biztalk 消息文件

电子邮件有一个额外的正文部分,是否可以使用 mime 解码器在接收位置直接忽略它?否则我有什么选择?如果可能的话,我想避免编辑编排或添加新的编排。

标签: sqlbiztalkpop3

解决方案


推荐阅读