Conditions - using "&&" instead of "and"

Not applicable

Hi Apigee Community,

We tried to establish some internal guidelines for writing conditions. We've read this document: http://docs.apigee.com/api-services/reference/conditions-reference and were happy to acknowledge that we can use both symbols and/or words (ex. "II" instead of "or", "&&" instead of "and").

So after an internal discussion we decided to use symbols only... and here we encountered a strange behaviour on part of the Edge UI:

When we change "or" for "||" everything works just fine. But when we try to for example change "and" in the following:

 <RouteRule name="route-rule-name">
        <Condition>(proxy.pathsuffix MatchesPath "/foo**") and (request.verb = "GET")</Condition>
        <TargetEndpoint>endpoint-name</TargetEndpoint>
    </RouteRule>

to "&&":

 <RouteRule name="route-rule-name">
        <Condition>(proxy.pathsuffix MatchesPath "/foo**") && (request.verb = "GET")</Condition>
        <TargetEndpoint>endpoint-name</TargetEndpoint>
    </RouteRule>

Then we get errors and the new revision simply won't save. Using more/less brackets does not seem to change anything.

Has anyone encountered the same problem? Or maybe I'm missing something obvious here?

Thanks in advance for any help you might provide,

Ula

Solved Solved
0 2 146
1 ACCEPTED SOLUTION

@Ula I don't think you're missing anything. I confirmed the same problem. When you use && in a condition, Edge gives a deployment error. For now, I think you'll have to use "and". I'll file an issue to see if this can be fixed.

View solution in original post

2 REPLIES 2

@Ula I don't think you're missing anything. I confirmed the same problem. When you use && in a condition, Edge gives a deployment error. For now, I think you'll have to use "and". I'll file an issue to see if this can be fixed.

@wwitman, thank you very much for this confirmation. It would be great to know if this could be fixed.