1
votes

I call a wso2 DSS data service, which will return available database rows as response. I use an Iterate mediator to iterate over the elements and perform the required task.

My issue is when the database has no entries, the data service doesn't return a response but the iterate mediator starts to iterate and throws up an exception in the ESB. Is there a property to tell the iterate mediator only to iterate if elements are available? Similar to a java if (null) check

1

1 Answers

1
votes

Check if there is data before calling iterate mediator :

<filter xpath="boolean($body/something)">
    <then>
        --> iterate
    </then>
</filter>

xpath expression return true if "something" node exist