title: Write original Camel message to file
body: <p>New to camel and was wondering, given the following route below, how do I store the original message that came into the route in order to log it. So in my when condition below, I call a bean method and if the method returns true, I want to write the original message to a file. This example below instead wants to write the response from the bean call and not the original message that came into the route.</p>
  
  <p>I was thinking about using a setProperty like this below, but then I am not sure how to write this out using the file component?</p>
  
  <pre><code>&lt;setProperty propertyName="origInData"&gt;
          &lt;simple&gt;${body}&lt;/simple&gt;
  &lt;/setProperty&gt;
  </code></pre>
  
  <p>Any advise would be great. Thanks</p>
  
  <pre><code>&lt;route&gt;
      &lt;from uri="direct:processOrders"/&gt;
      &lt;bean method="isMaster" ref="mybean"/&gt;
      &lt;choice&gt;
          &lt;when&gt;
              &lt;simple&gt;${body} == true&lt;/simple&gt;
              &lt;to uri="file:c:/out/messages/?fileExist=Append&amp;amp;fileName=messages.txt"/&gt;
          &lt;/when&gt;
          &lt;otherwise&gt;
              &lt;log message="********* I'M IN SLAVE MODE - DO NOTHING"/&gt;
          &lt;/otherwise&gt;
      &lt;/choice&gt;
  &lt;/route&gt;
  </code></pre>