【问题标题】:Inbound properties are lost in transition between two flows入站属性在两个流之间的转换中丢失
【发布时间】:2015-02-03 07:31:49
【问题描述】:

有两个流Flow1,Flow2。 在 Flow1 中,我可以获得一些入站属性,并将这些属性复制到出站范围。

println 'Copying inbound properties to session:'
message.inboundPropertyNames.each { prop ->
    message.setOutboundProperty(prop, message.getInboundProperty(prop))
    println 'Setting ' + prop + ' --> ' + message.getInboundProperty(prop)
}          

但我无法在 Flow2 中获取这些出站属性。

【问题讨论】:

    标签: properties mule flow inbound


    【解决方案1】:

    如果您通过出站端点调用流 2,则您放入出站范围的属性将移回入站范围。因此,您需要在流程 2 中将它们作为 inboundProperties 访问。

    此外,您还可以使用复制属性转换器为您处理复制:

    <copy-properties propertyName="•" />

    【讨论】:

    • 没错。入站属性在消息到达时由入站端点设置,出站属性由出站端点在消息离开流时发送它们。如果消息离开 Flow1 并带有一些出站属性,然后到达 Flow2,则后面的入站端点将提供这些属性作为入站属性。问候,马科斯。
    猜你喜欢
    • 2013-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-09
    • 1970-01-01
    • 2019-07-24
    相关资源
    最近更新 更多