我正在使用骆驼路线来处理文件以导入项目 但是在处理完成后,请勿删除已处理的文件,
我的路线使用 delete = true ,应该删除我的文件
我做错了什么? 我需要添加其他内容以便删除我的处理文件吗?
<route>
<from uri="file:{{main.path}}src/import/data/items?include=.*&delete=true"/>
<setHeader headerName="organizationId"><constant>{{oid}}</constant></setHeader>
<setHeader headerName="documentType"><constant>items</constant></setHeader>
<onException>
<exception>java.lang.Exception</exception>
<redeliveryPolicy maximumRedeliveries="1" />
<handled><constant>true</constant></handled>
<to uri="direct:errorResponse" />
</onException>
<process ref="processCsvInitializeRoute" />
<to uri="file:{{main.path}}/src/import/imports/?fileName=${header.fileName}" />
<choice>
<when>
<simple>$simple{in.header.fileExtension} == 'xls' || $simple{in.header.fileExtension} == 'XLS' || $simple{in.header.fileExtension} == 'xlsx' || $simple{in.header.fileExtension} == 'XLSX'</simple>
<process ref="processXlsGetDataRoute" />
<process ref="processXlsParsingRoute" />
<choice>
<when>
<simple>$simple{in.body.validationResults.size} == 0</simple>
<setHeader headerName="map.file"><constant>{{main.path}}src//smooks//SMOOKS_BeanToCsvQuery.xml</constant></setHeader>
<process ref="processUploadRoute" />
</when>
<otherwise>
<process ref="processXlsErrorRoute" />
<to uri="file:{{main.path}}/src/import/errors/?fileName=${header.resultFileName}" />
</otherwise>
</choice>
</when>
</choice>
<log message="Response: ${body}" />
</route>