0
我的要求是每隔幾分鐘輪詢一次數據庫並獲得一個sql。因此,我的代碼是找到的元素'simple'開頭的內容無效。駱駝問題
<camel:route>
<camel:from uri="timer:dataRetrieve?period=5s"/>
<camel:to uri="sql:select output_obj,create_dt,destination_type from dbo.gcas_events_test where process_sw = 'N' order by create_dt desc" />
</camel:route>
我期待從我的數據集中的3個字段。我想看看destination_type ='SEC',那麼它必須去不同的路線。
所以我想出了。
<camel:route>
<camel:from uri="timer:dataRetrieve?period=5s"/>
<camel:to uri="sql:select output_obj,create_dt,destination_type from dbo.gcas_events_test where process_sw = 'N' order by create_dt desc" />
<camel:choice>
<camel:when>
<simple>${body.destination_type}='SEC'</simple>
<camel:to uri="foo" />
</camel:when>
</camel:choice>
</camel:route>
而且它在簡單的標籤拋出一個錯誤。與ognl類似的問題也是如此。我在這裏做錯了什麼? ${body.destination_type}='SEC'
也會工作嗎? (假設我在數據集中有這個值)。
這是有效的。非常感謝。 – Krishna