{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by Robert Hoppe · Feb 23 at 06:20 PM · 22 Views assignmessage

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.

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
2

Answer by Priyadarshi Ajitav Jena · Feb 23 at 06:32 PM

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.

Comment
Add comment Show 4 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Dino-at-Google ♦♦   · Feb 23 at 10:10 PM 0
Link

We should update the documentation to state something about ordering.

avatar image Priyadarshi Ajitav Jena Dino-at-Google ♦♦ · Feb 23 at 10:26 PM 0
Link

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

avatar image Dino-at-Google ♦♦ Priyadarshi Ajitav Jena   · Feb 24 at 05:44 PM 0
Link

Reference cl/359306816

avatar image Robert Hoppe · Feb 24 at 07:24 AM 0
Link

Ok thank you guys.

Follow this Question

Answers Answers and Comments

70 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I transform the path between the proxy and the target? 9 Answers

Read assignMessage from sharedflow 0 Answers

How do you pass arrays in a QueryParam in an AssignMessage policy? 2 Answers

Assign Message OR condition check 1 Answer

CORS Error : header contains multiple values '*, *', but only one is allowed 2 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges