Is it possible to add Conditional Flow under Shared Flow in Apigee ? If it is then how ?

Not applicable

Hello All,

I want to add the conditional flow inside the shared flow as below,

	<SharedFlow>
	<Flows>
        <Flow name="HealthUp-Flow">
            <Description>Defines the conditional flow when the service is running successfully</Description>
            <Request/>
            <Response>
                <Step>
                    <Name>Assign-MessageProcessConditionalRouting</Name>
                </Step>
            </Response>
            <Condition>responseStatus = "success"</Condition>
        </Flow>
        <Flow name="HealthDown-Flow">
            <Description>Defines the conditional flow when the service is not running</Description>
            <Request/>
            <Response>
                <Step>
                    <Name>Assign-MessageSendErrorResponse</Name>
                </Step>
            </Response>
            <Condition>responseStatus = "error"</Condition>
        </Flow>
    </Flows>
	</SharedFlow>
0 1 1,164
1 REPLY 1

Hi @Harsh Sharma,

You can put the conditions inside the step to achieve what you want:

<SharedFlow>
    <Step>
	<Description>When the service is running successfully</Description>
        <Condition>responseStatus = "success"</Condition>
        <Name>Assign-MessageProcessConditionalRouting</Name>
    </Step>
    <Step>
        <Description>When the service is not running</Description>
        <Condition>responseStatus = "error"</Condition>
        <Name>Assign-MessageSendErrorResponse</Name>
    </Step>
</SharedFlow>

Thanks for using the community!

Don't forget to hit Accept if your satisfied.