使用ラバモジュール-リクエスタhttps://github.com/mulesoft/mule-module-requester、一緒にポーリングスケジューラを有します。
関連記事:http://blogs.mulesoft.com/dev/mule-dev/introducing-the-mule-requester-module/
もう一つの方法は、FTPフローは初期状態= "停止" に設定し
で、ポーリングスケジューラはフローを始めましょう。 FTP処理後、再度フローを停止します。あなたはグローバル要素セクションにファイルエンドポイントを作成し、ポーリング範囲内でそのエンドポイントを呼び出すためにラバリクエスタを使用することができます
<ftp:connector name="FTP" pollingFrequency="1000"
validateConnections="true" moveToDirectory="/work/ftp/processed"
doc:name="FTP" />
<flow name="scheduleStartFTPFlow">
<poll doc:name="Poll">
<fixed-frequency-scheduler frequency="1"
timeUnit="MINUTES" />
<expression-component doc:name="START FTP FLOW"><![CDATA[if(app.registry.processFTPFlow.isStopped()){
app.registry.processFTPFlow.start();
}]]></expression-component>
</poll>
<logger message="Poll Logging: #[payload]" level="INFO"
doc:name="Logger" />
</flow>
<flow name="processFTPFlow" initialState="stopped">
<ftp:inbound-endpoint host="localhost" port="21"
path="/data/ftp" user="Sanjeet" password="sanjeet123" responseTimeout="10000"
doc:name="FTP" connector-ref="FTP" />
<logger message="Logging FTP #[payload]" level="INFO" doc:name="Logger" />
<expression-component doc:name="STOP FTP FLOW"><![CDATA[app.registry.processFTPFlow.stop();]]></expression-component>
</flow>
投票スコープ例のcronスケジュールのために、単純なファイルのポーリングよりも多くのオプションを持っていました。それはポーリングの範囲でファイルコネクタを使用したい理由は、私の質問はあなたの答えを持っていた、返信いただきありがとうございます。 – ssanrao