【问题标题】:Mule inbound endpoint is not picking fileMule 入站端点未选择文件
【发布时间】:2014-05-20 19:52:04
【问题描述】:
<flow name="receive-files-from-client">
        <file:inbound-endpoint connector-ref="ibFileConnector"
                               path="/client-data/accounts/client/ToTest">
            <file:filename-wildcard-filter pattern="ABC_123*.txt, XYZ_987*.txt" />

            <object-to-byte-array-transformer />   <!-- need to convert from an input stream to a byte array to avoid having the wire-tap close it -->

            <wire-tap>
                <file:outbound-endpoint path="${workingDdir}/Dir1/archive/inbound/#[function:datestamp-yyyy-MM-dd_HH-mm-ss.SSS]" />
            </wire-tap>
        </file:inbound-endpoint>

....
...
</flow>

我已经正确配置了所有内容,但是 Mule 没有从该入站路径位置选择文件。

【问题讨论】:

  • 你能在日志中看到文件是没有被拾取还是被过滤掉了吗?
  • 经过一些更改,Mule 正在尝试访问文件但错误是:ERROR... [[Application-1.0-SNAPSHOT].inboundFileConnector.receiver.02] org.mule.exception.DefaultSystemExceptionStrategy: ** ******* 消息:文件“CYC53_855.001234txt”不存在或无法读取代码:MULE_ERROR-6 ------------------------ ------

标签: mule endpoint inbound


【解决方案1】:

使用以下修改后的流程。您在入站文件中使用出站文件。

<flow name="receive-files-from-client">
        <file:inbound-endpoint connector-ref="inboundFileConnector"
                               path="/client-ftpdata/ftpaccounts/client/To_CC-Test">
            <file:filename-wildcard-filter pattern="CYC53_810*.txt,CYC53_855*.txt,CYC53_856*.txt,CYC53_997*.txt" />

            <object-to-byte-array-transformer />   <!-- need to convert from an input stream to a byte array to avoid having the wire-tap close it -->

            <wire-tap>
                <file:outbound-endpoint path="${global.workdir}/suppliers/S000590/archive/inbound/#[function:datestamp-yyyy-MM-dd_HH-mm-ss.SSS]" />
            </wire-tap>
        </file:inbound-endpoint>
            <wire-tap>
                <file:outbound-endpoint path="${global.workdir}/suppliers/S000590/archive/inbound/#[function:datestamp-yyyy-MM-dd_HH-mm-ss.SSS]" />
            </wire-tap>


....
...
</flow>

尝试在没有过滤器的情况下执行您的流程,并查看流程是否正在挑选文件。如果是这样,请修改您的过滤器正则表达式。

希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-15
    • 2013-02-22
    • 1970-01-01
    • 2012-12-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多