title: How to use choice in Mule and to get value of variable "MULE_JDBC_UDATE_COUNT" back to client
body: <ol>
  <li><p>I'm trying to get my choice branch in Mule to branch on number of parameters in <code>http.query.params</code> is that possible?</p></li>
  <li><p>How do I return the value of the <code>MULE_JDBC_UDATE_COUNT</code> variable to the client?</p></li>
  </ol>
  
  <p>My config.xml</p>
  
  <pre><code>&lt;spring:beans&gt; 
      &lt;spring:bean id="InformixDatasource" name="InformixDatasource" class="org.enhydra.jdbc.standard.StandardDataSource"&gt; 
          &lt;spring:property name="password" value="xxxxx"&gt;&lt;/spring:property&gt;  
          &lt;spring:property name="driverName" value="com.informix.jdbc.IfxDriver"&gt;&lt;/spring:property&gt;  
          &lt;spring:property name="user" value="informix"&gt;&lt;/spring:property&gt;  
          &lt;spring:property name="url" value="jdbc:informix-sqli://browning.frett.ehf:1527/dev:informixserver=ol_brown"&gt;&lt;/spring:property&gt;  
      &lt;/spring:bean&gt;  
  &lt;/spring:beans&gt;
  &lt;jdbc-ee:connector name="InformixConnector" dataSource-ref="InformixDatasource" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"&gt;&lt;/jdbc-ee:connector&gt;
  &lt;flow name="postdrefing_fetch_dataFlow1" doc:name="postdrefing_fetch_dataFlow1"&gt; 
      &lt;http:inbound-endpoint exchange-pattern="request-response" host="0.0.0.0" port="8084" doc:name="HTTP" path="postdreifing"&gt;&lt;/http:inbound-endpoint&gt;  
      &lt;logger message="before db Choice #[message.payload]" level="INFO" doc:name="Logger"&gt;&lt;/logger&gt;
      &lt;choice doc:name="Choice"&gt;
          &lt;when expression="message.inboundProperties['dreifing'] != null and message.inboundProperties['dags'] != null or message.inboundProperties['dags'] != null"&gt; 
              &lt;logger message="delete #[message.inboundProperties['http.query.params']]" level="INFO" doc:name="Logger"&gt;&lt;/logger&gt;  
              &lt;jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="deleteById" queryTimeout="-1" connector-ref="InformixConnector" doc:name="Delete from nafnadreifing by id"&gt; 
                  &lt;jdbc-ee:query key="deleteById" value="DELETE FROM fdr_nafnadreifing WHERE dreifing = #[message.inboundProperties['dreifing']] and dags = TO_DATE(#[message.inboundProperties['dags']],'%d%m%Y')"&gt;&lt;/jdbc-ee:query&gt;  
              &lt;/jdbc-ee:outbound-endpoint&gt;  
              &lt;logger message="Deleted #[flowVars['MULE_JDBC_UDATE_COUNT']] rows" level="INFO" doc:name="Logger"&gt;&lt;/logger&gt;
              &lt;set-payload value="Deleted #[flowVars['MULE_JDBC_UDATE_COUNT']] rows" doc:name="Set Payload"/&gt;
          &lt;/when&gt;
          &lt;otherwise&gt; 
              &lt;logger message="default" level="INFO" doc:name="Logger"&gt;&lt;/logger&gt;  
              &lt;jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="selectStatement" queryTimeout="-1" connector-ref="InformixConnector" doc:name="Select all from ibudaskra"&gt; 
                  &lt;jdbc-ee:query key="selectStatement" value="SELECT skyring,gata,gata_thgf,husnumer,auka,pnr,hverfi,ibudafjoldi,fjolpostur,athugasemdir,breytt,bannmerki,uppfaert,sortnr,pakki,active,tegund,ibud FROM fdr_ibudaskra"&gt;&lt;/jdbc-ee:query&gt;  
              &lt;/jdbc-ee:outbound-endpoint&gt;  
              &lt;json:object-to-json-transformer doc:name="Object to JSON"&gt;&lt;/json:object-to-json-transformer&gt;  
          &lt;/otherwise&gt;  
      &lt;/choice&gt;  
  &lt;/flow&gt;
  </code></pre>
  
  <p></p>