I have a requirement to use the <clone> and <aggregate> to send parallel
request to multiple endpoints and collect the responses. Say I have four
such target endpoints. But calling each endpoint is based on some
condition. i.e. depending on the condition we may or may not be needed to
call the endpoint. Thus in pseudo level
<clone id="operaions_id">
<target>
<sequence>
if condition
use send/call mediator to call the endpoint
</sequence>
</target>
<target>
<sequence>
if condition
use send/call mediator to call the endpoint
</sequence>
</target>
<target>
<sequence>
if condition
use send/call mediator to call the endpoint
</sequence>
</target>
<target>
<sequence>
if condition
use send/call mediator to call the endpoint
</sequence>
</target>
</clone>
<aggregate id="operaions_id">
<completeCondition timeout="10">
<messageCount max="-1" min="-1"/>
</completeCondition>
<onComplete enclosingElementProperty="Result"
expression="$body/*[1]">
<!-- do some work on aggregated response
</onComplete>
</aggregate>
The problem is if the condition is not met and the internal call is not
made, the aggragation won't happen to that particular target and I can see
this following WARN in the logs.
Deep clone not happened for property : xyz
In this case the aggregate will timeout and stop moving forward. Any
recommendation on how this can be handled?
--
Shazni Nazeer
Mob : +94 777737331
LinkedIn : http://lk.linkedin.com/in/shazninazeer
Blogs :
https://medium.com/@mshazninazeer
http://shazninazeer.blogspot.com
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev