我正在尝试让我在 Mule 中选择的分支在参数数量上进行分支,
http.query.params
这可能吗?如何将
MULE_JDBC_UDATE_COUNT
变量的值返回给客户端?
我的 config.xml
<spring:beans>
<spring:bean id="InformixDatasource" name="InformixDatasource" class="org.enhydra.jdbc.standard.StandardDataSource">
<spring:property name="password" value="xxxxx"></spring:property>
<spring:property name="driverName" value="com.informix.jdbc.IfxDriver"></spring:property>
<spring:property name="user" value="informix"></spring:property>
<spring:property name="url" value="jdbc:informix-sqli://browning.frett.ehf:1527/dev:informixserver=ol_brown"></spring:property>
</spring:bean>
</spring:beans>
<jdbc-ee:connector name="InformixConnector" dataSource-ref="InformixDatasource" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"></jdbc-ee:connector>
<flow name="postdrefing_fetch_dataFlow1" doc:name="postdrefing_fetch_dataFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="0.0.0.0" port="8084" doc:name="HTTP" path="postdreifing"></http:inbound-endpoint>
<logger message="before db Choice #[message.payload]" level="INFO" doc:name="Logger"></logger>
<choice doc:name="Choice">
<when expression="message.inboundProperties['dreifing'] != null and message.inboundProperties['dags'] != null or message.inboundProperties['dags'] != null">
<logger message="delete #[message.inboundProperties['http.query.params']]" level="INFO" doc:name="Logger"></logger>
<jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="deleteById" queryTimeout="-1" connector-ref="InformixConnector" doc:name="Delete from nafnadreifing by id">
<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')"></jdbc-ee:query>
</jdbc-ee:outbound-endpoint>
<logger message="Deleted #[flowVars['MULE_JDBC_UDATE_COUNT']] rows" level="INFO" doc:name="Logger"></logger>
<set-payload value="Deleted #[flowVars['MULE_JDBC_UDATE_COUNT']] rows" doc:name="Set Payload"/>
</when>
<otherwise>
<logger message="default" level="INFO" doc:name="Logger"></logger>
<jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="selectStatement" queryTimeout="-1" connector-ref="InformixConnector" doc:name="Select all from ibudaskra">
<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"></jdbc-ee:query>
</jdbc-ee:outbound-endpoint>
<json:object-to-json-transformer doc:name="Object to JSON"></json:object-to-json-transformer>
</otherwise>
</choice>
</flow>