less than operator is not working in condition

Following condition expression is throwing error.

<condition>(response1.retryCount < response2.retryCount)</condition>

Can you please help me on this. Is less than operator is not supported?

0 5 239
5 REPLIES 5

sidd-harth
Participant V

Less than operator does work in Apigee. Check your Trace and see why it is not working.

You can also use words like,

<condition>response1.retryCount LesserThan response2.retryCount</condition> 

https://docs.apigee.com/api-platform/reference/conditions-reference#operators

Thank you Siddharth

"throwing error' means what, exactly?

Try to provide more information than you think we'll need.

And remember: we cannot see your screen. Orient us. Don't assume we know all the stuff you know, about what you're trying and seeing.

I got the problem When i used '<' symbol , Policy was throwing invalid xml error. I changed it to word LesserThan that resolved the problem. I never assumed anything here , I was just curious to know if it is supported or not. Thanks for response

< has to be escaped inside the XML to (& lt ; ) otherwise the policy XML is not valid.

I've put blanks between symbols otherwise they are escaped here.

<condition>response1.retryCount (& lt ; ) response2.retryCount</condition>