AssignMessage Child Element Ordering

Hi guys,

is the ordering of Elements in an AssignMessage relevant for its execution?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage name="AM-Token" enabled="true" continueOnError="false">
    <Remove>
        <Headers>
            <Header name="Authorization"/>
        </Headers>
    </Remove>
    <Add>
        <Headers>
            <Header name="Authorization">Bearer {private.cached.my_access_token}</Header>
        </Headers>
    </Add>
    <AssignTo createNew="true" transport="http" type="request"/>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</AssignMessage>

vs.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage name="AM-Token" enabled="true" continueOnError="false">
    <Add>
        <Headers>
            <Header name="Authorization">Bearer {private.cached.my_access_token}</Header>
        </Headers>
    </Add>
    <Remove>
        <Headers>
            <Header name="Authorization"/>
        </Headers>
    </Remove
    <AssignTo createNew="true" transport="http" type="request"/>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</AssignMessage>

Brings a different result for me ... is that expected behaviour? Because I don't find something about ordering within the documentation.

0 5 121
5 REPLIES 5

Not applicable

Yes, the order is important in this case. It executes top to bottom. So, if you remove the variable first then it will become null and next assignment will be to null.

We should update the documentation to state something about ordering.

Yes, this scenario should be documented. It's almost 6th or 7th time I have seen developers having confusion.

Reference cl/359306816

Ok thank you guys.