title: Remote directory for sftp outbound gateway with DSL
body: <p>I'm having an issue with the SFTP outbound gateway using DSL.
  I want to use a outbound gateway to send a file, then continue my flow. 
  The problem is that I have an exception telling me:</p>
  
  <pre><code>IllegalArgumentException: 'remoteDirectoryExpression' is required
  </code></pre>
  
  <p>I saw that I can use a RemoteFileTemplate where I can set the sftp session factory plus the remote directory information, but the directory I wan't is defined in my flow by the code put in the header just before the launch of the batch. </p>
  
  <pre><code>    @Bean
  public IntegrationFlow orderServiceFlow() {
      return f -&gt; f
              .handleWithAdapter(h -&gt; h.httpGateway("myUrl")
                      .httpMethod(HttpMethod.GET)
                      .expectedResponseType(List.class)
              )
              .split()
              .channel(batchLaunchChannel());
  }
  
  @Bean
  public DirectChannel batchLaunchChannel() {
      return MessageChannels.direct("batchLaunchChannel").get();
  }
  
  @Bean
  public IntegrationFlow batchLaunchFlow() {
      return IntegrationFlows.from(batchLaunchChannel())
              .enrichHeaders(h -&gt; h
                      .headerExpression("oiCode", "payload")
              )
              .transform((GenericTransformer&lt;String, JobLaunchRequest&gt;) message -&gt; {
                  JobParameters jobParameters = new JobParametersBuilder()
                          .addDate("exec_date", new Date())
                          .addString("oiCode", message)
                          .toJobParameters();
                  return new JobLaunchRequest(orderServiceJob, jobParameters);
              })
              .handle(new JobLaunchingMessageHandler(jobLauncher))
  
              .enrichHeaders(h -&gt; h
                      .headerExpression("jobExecution", "payload")
              )
              .handle((p, h) -&gt; {
                  //Logic to retreive file...
                  return new File("");
              })
              .handle(Sftp.outboundGateway(sftpSessionFactory,
                      AbstractRemoteFileOutboundGateway.Command.PUT,
                      "payload")
              )
              .get();
  }
  </code></pre>
  
  <p>I don't see how I can tell my outbound gateway which will be the directory depending what is in my header.</p>