multiple flows only first flow getting executed.,always first flow getting executed.

defined multi flow with different condition but always first flow getting executed. what I am missing..

,

I have defined multiple flows and i want to only on per condition but always first flow is getting executed. Any idea what i am missing ..

0 3 59
3 REPLIES 3

Only first flow to evaluate true will be executed

https://docs.apigee.com/api-platform/reference/flow-configuration-reference

If this isn't your issue, but rather a flow your not expecting to execute is, then share an example of how you've configured the flow and condition.

yes. and it's possible the Condition element is misplaced. As far as I know Apigee can silently ignore that mis-configuration.

ok:

    <Flow name="login"> <!-- redirect -->
      <Request>
         ...steps here...
      </Request>
      <Response>
        <Step>
          <Name>AM-RedirectToLogin</Name>
        </Step>
      </Response>
      <Condition>(proxy.pathsuffix MatchesPath "/login") and (request.verb = "GET")</Condition>
    </Flow>

Not ok:

    <Flow name="login"> <!-- redirect -->
      <Request>
        <!-- INCORRECTLY PLACED Condition -->
        <Condition>(proxy.pathsuffix MatchesPath "/login") and (request.verb = "GET")</Condition>
         ...steps here...
      </Request>
      <Response>
        <Step>
          <Name>AM-RedirectToLogin</Name>
        </Step>
      </Response>
    </Flow>



Not applicable

This seems your first flow condition is always evaluating to true. So, try to implement the condition properly.