Я создал пакетное задание Mule с входом SFTP, и он не будет извлекать файл csv. Когда одни и те же компоненты перемещаются в рабочий процесс, SFTP-вход правильно проверяет и извлекает файл.Mule batch не запускается
Что я могу сделать, чтобы получить вход SFTP для опроса и получения входного файла?
XMLMule потока:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ftp="http://www.mulesoft.org/schema/mule/ftp" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:sftp="http://www.mulesoft.org/schema/mule/sftp" xmlns:batch="http://www.mulesoft.org/schema/mule/batch" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/sftp http://www.mulesoft.org/schema/mule/sftp/current/mule-sftp.xsd
http://www.mulesoft.org/schema/mule/batch http://www.mulesoft.org/schema/mule/batch/current/mule-batch.xsd
http://www.mulesoft.org/schema/mule/ee/ftp http://www.mulesoft.org/schema/mule/ee/ftp/current/mule-ftp-ee.xsd
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ftp/current/mule-ftp.xsd">
<ftp:connector name="FTP" pollingFrequency="1000" validateConnections="true" doc:name="FTP"></ftp:connector>
<sftp:connector name="SFTP" validateConnections="true" doc:name="SFTP" pollingFrequency="10"></sftp:connector>
<http:request-config name="HTTP_Request_Configuration" host="${host}" port="${userprocess.port}" doc:name="HTTP Request Configuration"></http:request-config>
<batch:job name="userbatch">
<batch:input>
<sftp:outbound-endpoint exchange-pattern="request-response" connector-ref="SFTP" host="localhost" port="2222" path="//input" user="${ftp.user}" password="${ftp.password}" responseTimeout="10000" doc:name="SFTP"/>
</batch:input>
<batch:process-records>
<batch:step name="Batch_Step">
<object-to-string-transformer mimeType="application/csv" doc:name="Object to String"></object-to-string-transformer>
<object-to-byte-array-transformer doc:name="Object to Byte Array"></object-to-byte-array-transformer>
<logger message="#['Record ' +flowVars.counter +' being processed: ' + payload]" level="INFO" doc:name="Logger"></logger>
</batch:step>
</batch:process-records>
<batch:on-complete>
<sftp:outbound-endpoint exchange-pattern="one-way" connector-ref="SFTP" outputPattern="#[message.inboundProperties.originalFilename+'.processed']" host="localhost" port="2222" path="//output" user="${ftp.user}" password="${ftp.password}" responseTimeout="10000" duplicateHandling="addSeqNo" keepFileOnError="true" doc:name="SFTP"></sftp:outbound-endpoint>
</batch:on-complete>
</batch:job>
</mule>
CSV файл:
1,user1
Благодаря