Hello,
Maybe I wrongly understand your problem but, what if when the call is not
made, you just send an dummy (empty?) payload with the same structure you
would retrieve if the call was made? I suppose you are using the filter
mediator for your "if" condition?
For example:
<clone>
<target>
<sequence>
if condition
use send/call mediator to call the endpoint
else
payload factory mediator invokation to construct a dummy
payload
</sequence>
</target>
</clone>
And when you specifiy send/call mediator, do you mean that you have tried
with both call and send mediators and it has the same result?
Regards,
Thomas
2018-01-24 2:17 GMT+01:00 Shazni Nazeer <[email protected]>:
> 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
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev