title: Mule: how to assign a Java/Spring bean's method call result to a flow variable
body: <p>I am new to Mule. I understand I can have"Java" or "Invoke" component in the Mule flow configuration. My question is: how can I assign the value returned by a Java method call to a Mule flow variable? ex. something like</p>
  
  <pre><code>&lt;spring-bean name="myBean" .... /&gt;
  
  &lt;invoke object-ref="myBean" method="addTwoNumbers" methodArguments="#[var1], #[var2]" methodArgumentTypes="java.lang.Float, java.lang.Float" name="someName" doc:name="Invoke"/&gt;
  
  &lt;set-variable variableName="addResult" value="???????" /&gt;
  </code></pre>
  
  <p>I need the "addResult" var to have the value of the previous invocation result, but how?</p>
  
  <p>Thanks!</p>