Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.48 KB

sftp-on-new-file.adoc

File metadata and controls

38 lines (27 loc) · 1.48 KB

Trigger a Flow When a New File Is Created or Modified Example - Mule 4

Configure the On New or Updated File Operation in Studio

To add and configure the On New or Updated File operation in Studio, follow these steps:

  1. In the Mule Palette view, search for sftp and select the On New or Updated File operation.

  2. Drag the On New or Updated File operation onto the Studio canvas.

  3. In the General tab of the operation configuration screen, click the plus sign (+) next to the Connector configuration field to access the global element configuration fields.

  4. Specify the connection information and click OK.

  5. Set the Directory field to the directory path on which pooled files are contained, for example, test-data/in.

  6. Set the Auto delete field to True.

  7. Select the Watermark field to enable watermarking.

On New or Updated File operation configuration in Studio

In the Configuration XML editor, the <sftp:listener> configuration looks like this:

<flow name="onNewFile">
    <sftp:listener config-ref="file" directory="test-data/in" autoDelete="true" watermarkEnabled="true">
      <scheduling-strategy>
        <fixed-frequency frequency="1000"/>
      </scheduling-strategy>
    </sftp:listener>

    <flow-ref name="processFile" />
</flow>