Using Extract Message policy and using in Assign Message Policy

In Extract Message Policy if we are extracting only the query param value

<Source>request</Source>

<VariablePrefix>extracted</VariablePrefix>

<QueryParam name="stat">

<Pattern ignoreCase="true">{singleValue}</Pattern> </QueryParam>

And in Assign Message usage will be as below to create the target URL

<Name>TargetPathSuffix</Name>

<Value>url1/url2/url3/v1/url3/{extracted.singleValue}</Value>

In the Trace its updates like below for Value

http://XXX.YYY/hardcoded1/hardcoded2/%7Bextracted.singleValue%7D'

Why spl character with %7Bextracted.singleValue%7D listed information gets appended to Value than expected value was to have the value of query updated

http://XXX.YYY/hardcoded1/hardcoded2/MyStatus'

GET is something like below

https://<Required-Org>/<basePath>/requiredUrl?stat=MyStatus

Solved Solved
0 1 208
1 ACCEPTED SOLUTION

Hi @Abiram Radhakrishnan,

Instead of <value> in assign message policy use message template <template />. The curly braces are not supposed by <value> in assign message policy.

Here is the code for assign message policy.

<AssignVariable>
        <Name>TargetPathSuffix</Name>
        <Template>http://XXX.YYY/hardcoded1/hardcoded2/{extracted.singleValue}</Template>
    </AssignVariable>

you can see my trace session screenshot also.

8985-screen-shot-2019-08-08-at-55211-pm.png

View solution in original post

1 REPLY 1

Hi @Abiram Radhakrishnan,

Instead of <value> in assign message policy use message template <template />. The curly braces are not supposed by <value> in assign message policy.

Here is the code for assign message policy.

<AssignVariable>
        <Name>TargetPathSuffix</Name>
        <Template>http://XXX.YYY/hardcoded1/hardcoded2/{extracted.singleValue}</Template>
    </AssignVariable>

you can see my trace session screenshot also.

8985-screen-shot-2019-08-08-at-55211-pm.png