Conditional flows in Target endpoint not executing

Not applicable

The conditional flows in target endpoint are not executing.

The proxyendpoint conditional flows are executing for the same condition.I have no clue what is the mistake in the below code.

The below is the code I have in Target endpoint "default"

<Flows>
 <Flow name="balance_transfers"> 
 <Condition>(proxy.pathsuffix MatchesPath "/abc") and (request.verb = "POST")</Condition>
 <Description/>
<Request>
<Step>
<Name>JavaScript_TargetURLModify</Name>
</Step>
</Request>
<Response/></Flow>
</Flows>

	

The same condition,

<Condition>(proxy.pathsuffix MatchesPath "/abc") and (request.verb = "POST")</Condition>

is working in proxy_endpoint conditional flows.

But with target endpoint,the execution is not even entering into the conditional flows.

My understanding is proxy.pathsuffix works in target endpoint.But I am not sure whether this is creating problem here.

Please help on this.

Solved Solved
1 7 259
1 ACCEPTED SOLUTION

HI @RK4

As part of the policy, are you updating the request verb or something ? Probably the value is being modified as part of any policy and because of that, the condition in the target end point fails. Please trace the request.verb in the target end point and see what it is

I have seen proxies that is defined as GET but when it goes to the target, they are changed to POST (using Assign Message policy or JS policy). This updates the request.verb and becomes POST in the target end point flows as well

So please check that and let me know

View solution in original post

7 REPLIES 7

HI @RK4

As part of the policy, are you updating the request verb or something ? Probably the value is being modified as part of any policy and because of that, the condition in the target end point fails. Please trace the request.verb in the target end point and see what it is

I have seen proxies that is defined as GET but when it goes to the target, they are changed to POST (using Assign Message policy or JS policy). This updates the request.verb and becomes POST in the target end point flows as well

So please check that and let me know

@Sai Saran Vaidyanathan

Thanks for your response...

I dont see request.verb at all in the target enpoint.Also,I dont have any policy which removes any headers...No clue 😞

HI @RK4

Not the headers, I am referring to the request verb itself.

Are you changing the verb from GET to something else when you are hitting your target ?

Would it be possible to paste the javascript code you have in the flow ? I am assuming that is the only policy in the proxy flow ?

I just tried to replicate the same in cloud version.I could see that both proxy endpoint and target endpoint conditional flows are not working.

Please let me know what I am missing..targetendpoint-conditionalflow-rev1-2016-08-09.zip

Hi @RK4

I looked at your proxy. I see <Flows/> tag in your proxy and target end point default.xml (line number 25). Please remove that. That is overriding the actual Flows element. It should work after you remove that line.

Let me know if that worked !

🙂 This has worked for me...I removed <Flows/>.Its working like charm...

No worries @RK4

Can you please accept the answer