0

我创建了一个具有包含布尔属性的属性架构的编排项目IsForFramework。我的目标是让编排接收所有类型的消息,这些消息System.Xml.XmlDocument具有提升的上述属性,其值为true.

这是属性模式的一部分:

<xs:schema xmlns="http://Bakker.Framework.Orchestrations.Framework" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://Bakker.Framework.Orchestrations.Framework" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:annotation>
    <xs:appinfo>
      <b:schemaInfo schema_type="property" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" /> 
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="IsForFramework" type="xs:boolean">
    <xs:annotation>
      <xs:appinfo>
        <b:fieldInfo propertyGuid="9358dd05-92f7-4c84-8dc1-8427bea580a6" propSchFieldBase="MessageContextPropertyBase" /> 
      </xs:appinfo>
    </xs:annotation>
  </xs:element>
</xs:schema>

接收形状​​上的过滤器表达式:

(Bakker.Framework.Orchestrations.IsForFramework == true)

从 BizTalk 控制台查询的实际订阅:

http://Bakker.Framework.Orchestrations.Framework.IsForFramework == True

路由失败报告上下文中:

IsForFramework  True    Promoted    http://Bakker.Framework.Orchestrations.Framework

对于我的一生,我无法弄清楚这里可能出了什么问题。

4

2 回答 2

2

尝试过滤器表达式:

Bakker.Framework.Orchestrations.IsForFramework == "真"

单引号也可以工作,Orchestration Designer 中的表达式编辑器与 BT Admin 中的表达式编辑器不同。

于 2014-11-10T16:46:40.067 回答
1

在与 MDeSchaepmeester 进行一些讨论后,确定根本问题是管道组件正在提升该上下文属性以及它正在作为字符串提升的所有其他组件,但是此上下文属性在属性模式中被定义为布尔值。来自IBaseMessageContext.Promote 方法 “如果提升属性的类型与订阅中指定的值不匹配,则比较失败并且不会发生消息订阅。”

在这种情况下,您有两个选择

1)确保在提升对象时将对象转换为布尔值。

2) 按照 Johns-305 的建议,将字段类型更改为 String 并将过滤器表达式更改为 Bakker.Framework.Orchestrations.IsForFramework == "True" (如果它们匹配类型,您将不会收到错误消息)

于 2014-11-11T20:21:04.897 回答