title: Spring Integration flow (Outbound and inbound)
body: <p>I have a situation I don't know how to manage it.</p>
  
  <p>The flow I neeed is the following one:</p>
  
  <ol>
  <li><p>The first service makes its job and creates a message that needs to be retrieved in the chain's end.</p></li>
  <li><p>When the first service finishes, I need to invoke a push notification server via a new service with a particular message but with some info related to the one created in step 1.</p></li>
  <li><p>Finally, I the push notification has been sent successfully, I have to retrieve the message created in step 1.</p></li>
  </ol>
  
  <p>The question is, how can I keep message created in step 1 when the outbound-gateway calling was produced and retrieved me the message from notification push server? </p>
  
  <pre><code>&lt;int:chain input-channel="v1.inputChannel.input" output-channel="v1.inputChannel.output" send-timeout="50000"&gt;
  
      &lt;int:header-enricher&gt;
          &lt;int:error-channel ref="v1.inputChannel.error" /&gt;
      &lt;/int:header-enricher&gt;
  
      &lt;int:service-activator ref="v1.input.service" method="methodName"/&gt;
  
      &lt;int:service-activator ref="v1.notificationPusher.service" method="pushNotification"/&gt;
  
      &lt;int-http:outbound-gateway url="http://example.com/api/elements/:element_id/objects" http-method="POST"&gt;
          &lt;int-http:uri-variable name="element_id" expression="#pathVariables.elementId"/&gt;
      &lt;/int-http:outbound-gateway&gt;
      &lt;!-- here the transformer needs to get the messsage from v1.input.service --&gt;
      &lt;int:object-to-json-transformer/&gt;
  
  &lt;/int:chain&gt;
  </code></pre>