title: Best way to deal with a stored procedure that's doesn't return any result
body: <p>I am using Spring Integration in my project.I have a stored procedure which inserts a row and doesn't return any result. If I use <code>int-jdbc:stored-proc-outbound-gateway</code>, the flow simply terminates and won't connect to the next channel.</p>
  
  <pre><code>DEBUG [org.springframework.jdbc.core.JdbcTemplate.doInCallableStatement] CallableStatement.execute() returned 'false'   
  DEBUG [org.springframework.jdbc.core.JdbcTemplate.doInCallableStatement] CallableStatement.getUpdateCount() returned 0  
  DEBUG [org.springframework.jdbc.core.JdbcTemplate.extractReturnedResults] CallableStatement.getUpdateCount() returned -1
  </code></pre>
  
  <p>My requirement is to continue the flow even if the stored procedure doesn't return any result. What is the best way to handle? </p>
  
  <blockquote>
    <p>UPDATE</p>
  </blockquote>
  
  <p>After Artem's response, I have configured stored procedure outbound channel adapter in the following manner:</p>
  
  <pre><code>&lt;int:service-activator  ref="msgHandler" method="buildRequestBasedDataSource" input-channel="PQPutUserBAInformation-SPCall2" output-channel="PQPutUserBAInformation-publishSubscribeChannel"/&gt;
      &lt;!-- PQPutUserBAInformation Channel --&gt;
  
          &lt;int:publish-subscribe-channel id="PQPutUserBAInformation-publishSubscribeChannel"  /&gt;
  
          &lt;int-jdbc:stored-proc-outbound-channel-adapter
                          id="PQPutUserBAInformation-AWD-StoredProcedure2" 
                          channel="PQPutUserBAInformation-publishSubscribeChannel" 
                          data-source="routingDataSource" 
                          stored-procedure-name="ZSPPQINSERTUSERIDBA"
                          ignore-column-meta-data="true"  
                          use-payload-as-parameter-source = "false" &gt;
  
                          &lt;int-jdbc:sql-parameter-definition name="P_USERID" direction="IN" type="VARCHAR" /&gt;
  
                          &lt;int-jdbc:parameter name="P_USERID" expression="#xpath(payload, '//CurrentUserID')" /&gt;
          &lt;/int-jdbc:stored-proc-outbound-channel-adapter&gt;
  
          &lt;!-- Service Activator to build the Message from the Stored Procedure ResultSet --&gt;
      &lt;int:service-activator input-channel="PQPutUserBAInformation-publishSubscribeChannel" ref="msgHandler" method="buildMessageFromExtSysResponse" /&gt;       
  </code></pre>