0
아웃 바운드 엔드 포인트에서 주소를 동적으로 설정해야합니다. forward.url의 경우이 아웃 바운드 URL은 HTTP 또는 HTTPS가 될 수 있습니다. 그래서 저는 2 개의 서브 플로우를 작성했습니다. 하나는 HTTP 용이고 다른 하나는 HTTPS 용입니다. 그러나
<set-variable value="#[message.inboundProperties['http.query.params']['forward.url']]" variableName="forwardAddress" doc:name="Variable"/>
<logger message="Forward address is #[forwardAddress] , and does it start with http:// ~ #[String.valueOf('${forwardAddress}').startsWith('http://');]" level="INFO" doc:name="Logger"/>
<choice doc:name="Choice">
<when expression="#['${forwardAddress}'.startsWith('http://')]">
<flow-ref name="HttpCall" doc:name="HTTP subflow"/>
</when>
<when expression="#['${forwardAddress}'.startsWith('https://')]">
<flow-ref name="Httpscall" doc:name="HTTPS subflow"/>
</when>
<otherwise>
<set-payload value="The query string forward.url must start with http:// or https://" doc:name="Set Payload"/>
<http:response-builder doc:name="Invalid Request - 400" status="400"/>
</otherwise>
</choice>
아래와 같이
는 경로에 적절한 서브 플로우에 대한 요청, 나는, 표현이 제대로 작동하지 않는 CHOICE 라우터를 작성하고 있습니다. 내가 도대체 뭘 잘못하고있는 겁니까?
감사합니다. Ryan. 내 어리석은 실수 :-) – user1493140