Hi, if I understand the need correctly which is to enable feeding in the list of route-to url at runtime; I hope this snippet of policy can provide a useful idea -
Policy export corresponding to above:
<?xml version="1.0" encoding="UTF-8"?>
<wsp:Policy xmlns:L7p="http://www.layer7tech.com/ws/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
<wsp:All wsp:Usage="Required">
<L7p:SetVariable>
<L7p:AssertionComment assertionComment="included">
<L7p:Properties mapValue="included">
<L7p:entry>
<L7p:key stringValue="RIGHT.COMMENT"/>
<L7p:value stringValue="// set your list of urls here; comma separated"/>
</L7p:entry>
</L7p:Properties>
</L7p:AssertionComment>
<L7p:Base64Expression stringValue="aHR0cDovLzE5Mi4xNjguMTMzLjEzMDo2MDYwL0FDTUVXYXJlaG91c2Uvc2VydmljZXMvV2FyZWhvdXNlU29hcD93c2RsLGh0dHA6Ly8xOTIuMTY4LjEzMy4xMzA6NjA2MC9BQ01FV2FyZWhvdXNlL3NlcnZpY2VzL1dhcmVob3VzZVNvYXA/d3NkbCxodHRwOi8vMTkyLjE2OC4xMzMuMTMwOjYwNjAvQUNNRVdhcmVob3VzZS9zZXJ2aWNlcy9XYXJlaG91c2VTb2FwP3dzZGw="/>
<L7p:VariableToSet stringValue="backend-url-list"/>
</L7p:SetVariable>
<L7p:Split>
<L7p:InputVariable stringValue="backend-url-list"/>
<L7p:OutputVariable stringValue="backend-url-mv-ctx-var"/>
</L7p:Split>
<L7p:ForEachLoop L7p:Usage="Required"
loopVariable="backend-url-mv-ctx-var" variablePrefix="target">
<wsp:OneOrMore wsp:Usage="Required">
<wsp:All wsp:Usage="Required">
<L7p:HttpRoutingAssertion>
<L7p:AssertionComment assertionComment="included">
<L7p:Properties mapValue="included">
<L7p:entry>
<L7p:key stringValue="RIGHT.COMMENT"/>
<L7p:value stringValue="// make sure to mark Assertion Outcome to "Never fail as long as target returns an anwser" in the "Other" tab of the properties dialog"/>
</L7p:entry>
</L7p:Properties>
</L7p:AssertionComment>
<L7p:ProtectedServiceUrl stringValue="${target.current]"/>
<L7p:ProxyPassword stringValueNull="null"/>
<L7p:ProxyUsername stringValueNull="null"/>
<L7p:RequestHeaderRules httpPassthroughRuleSet="included">
<L7p:Rules httpPassthroughRules="included">
<L7p:item httpPassthroughRule="included">
<L7p:Name stringValue="Cookie"/>
</L7p:item>
<L7p:item httpPassthroughRule="included">
<L7p:Name stringValue="SOAPAction"/>
</L7p:item>
</L7p:Rules>
</L7p:RequestHeaderRules>
<L7p:RequestParamRules httpPassthroughRuleSet="included">
<L7p:ForwardAll booleanValue="true"/>
<L7p:Rules httpPassthroughRules="included"/>
</L7p:RequestParamRules>
<L7p:ResponseHeaderRules httpPassthroughRuleSet="included">
<L7p:Rules httpPassthroughRules="included">
<L7p:item httpPassthroughRule="included">
<L7p:Name stringValue="Set-Cookie"/>
</L7p:item>
</L7p:Rules>
</L7p:ResponseHeaderRules>
</L7p:HttpRoutingAssertion>
<L7p:SetVariable>
<L7p:AssertionComment assertionComment="included">
<L7p:Properties mapValue="included">
<L7p:entry>
<L7p:key stringValue="RIGHT.COMMENT"/>
<L7p:value stringValue="// routed successfully: no need to try next url - exit the loop"/>
</L7p:entry>
</L7p:Properties>
</L7p:AssertionComment>
<L7p:Base64Expression stringValue="dHJ1ZQ=="/>
<L7p:VariableToSet stringValue="target.break"/>
</L7p:SetVariable>
</wsp:All>
<L7p:AuditDetailAssertion>
<L7p:Detail stringValue="Failed routing to ${target.current}; trying next one..."/>
<L7p:Level stringValue="WARNING"/>
</L7p:AuditDetailAssertion>
</wsp:OneOrMore>
</L7p:ForEachLoop>
<wsp:OneOrMore wsp:Usage="Required">
<wsp:All wsp:Usage="Required">
<L7p:ComparisonAssertion>
<L7p:Expression1 stringValue="${http.routing.status}"/>
<L7p:Expression2 stringValue="200"/>
<L7p:Predicates predicates="included">
<L7p:item binary="included">
<L7p:RightValue stringValue="200"/>
</L7p:item>
</L7p:Predicates>
</L7p:ComparisonAssertion>
<L7p:assertionComment>
<L7p:Properties mapValue="included">
<L7p:entry>
<L7p:key stringValue="RIGHT.COMMENT"/>
<L7p:value stringValue="// check that the loop exited for happy path"/>
</L7p:entry>
</L7p:Properties>
</L7p:assertionComment>
</wsp:All>
<L7p:AuditDetailAssertion>
<L7p:AssertionComment assertionComment="included">
<L7p:Properties mapValue="included">
<L7p:entry>
<L7p:key stringValue="RIGHT.COMMENT"/>
<L7p:value stringValue="// not happy path - handle it"/>
</L7p:entry>
</L7p:Properties>
</L7p:AssertionComment>
<L7p:Detail stringValue="handle failure for zero successful route to any url on backend-url-list..."/>
<L7p:Level stringValue="WARNING"/>
</L7p:AuditDetailAssertion>
</wsp:OneOrMore>
</wsp:All>
</wsp:Policy>