【问题标题】:Unable to get flow variable inside exception-strategy无法在异常策略中获取流变量
【发布时间】:2015-05-14 05:37:50
【问题描述】:

无法在异常中获取流变量。在下面的代码中,我尝试在 default-exception-strategy 中使用 centirofilename。它给出了异常

<set-variable value="#[xpath('//soap/filename/text()').text]"
variableName="centirofilename" doc:name="Variable" />

<default-exception-strategy>
  <rollback-transaction exception-pattern="*" /> <!-- [1] -->
    <processor-chain>
      <logger level="INFO" category="ProTSP Logger"
              message="#[centirofilename]" doc:name="Logger" />
    </processor-chain>
</default-exception-strategy>

【问题讨论】:

  • 在记录器组件 #[flowVars.centirofilename] 或 #[flowVars['centirofilename']] 中尝试使用此代码回滚

标签: exception mule esb rollback


【解决方案1】:

您应该使用rollback-exception-strategy 而不是您正在使用的那个。您使用的异常策略是遗留的,不推荐使用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-04
    • 2022-12-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多