调用一个服务激活器和另一个服务调用器



我对Spring Integration Flow有一个疑问。我们可以一个接一个地调用一个int:service activator吗。考虑下面的例子。

<int:channel id="getPresciption" />
<int:channel id="respPrescription" />       
<int-http:inbound-gateway
request-channel="getPresciption" reply-channel="respPrescription"
supported-methods="GET" path="/getAllPresciption">
<int-http:request-mapping
consumes="application/json" produces="application/json" />
</int-http:inbound-gateway>
<int:service-activator
ref="medicineServiceActivator" method="buildPrescription"
input-channel="respPrescription"  output-channel="respPrescription" />
<int:service-activator
ref="medicineServiceActivator" method="storePrescription"
input-channel="respPrescription"></int:service-activator>   

我的问题是我们能做到这一点吗。或者我们必须使用聚合器。

您需要另一个通道

<int:service-activator
ref="medicineServiceActivator" method="buildPrescription"
input-channel="respPrescription"  output-channel="toStorePrescription" />
<int:service-activator
ref="medicineServiceActivator" method="storePrescription"
input-channel="toStorePrescription"></int:service-activator>   

最新更新