Apigee Edge 4MV4D quota policy- flow variables

Not applicable

@Anil Sagar

In Apigee Edge - 4MV4D - Quota Policy - Flow Variables - S02E10 video

I am very new to Apigee Platform, while going through the quite helpful 4MV4D, I have these following questions :-

1. In the AssignMessage policy, Why have you used <IgnoreUnresolvedMessages> ??? It works fine without this tag at all.

2. And also in <AssignTo>tag, why the value of createNew is False ? It also works fine with the value as "True".

3. In <AssignTo>tag, value of type can also be "request" instead of "response" ??? It also works fine with the value as "request".

Solved Solved
0 2 174
2 ACCEPTED SOLUTIONS

IgnoreUnresolvedVariables will use null if a variable cannot be resolved, otherwise throw an error. Presumably, the variables used in the policy are expected to be resolved.

I believe by using type as "request" it would delete your request object if createNew was true. Or in the example used, if createNew is set to true with the type as response, the status of 500 for example would be lost. The new response object will have 200.

View solution in original post

@Bhanu Prakash ,

  • In the AssignMessage policy, Why have you used <IgnoreUnresolvedMessages> ??? It works fine without this tag at all.
    • Yes, It's an optional tag. Like said by @dane knezic If it's set to false, If any of the variables we are trying to use in the policy does not exist, processing in the API flow will stop & raises an error. If it's set to true, It will ignore the variables even if they are not present.
  • And also in <AssignTo>tag, why the value of createNew is False ? It also works fine with the value as "True".
    • If it's TRUE, It will override the input request.
    • If it's FALSE, It will append to the input request.
    • If it's TRUE & You specify the new request name like below, It will create new object that you can use to make service callouts. For example, See the video 4MV4D here.
  • In <AssignTo>tag, value of type can also be "request" instead of "response" ??? It also works fine with the value as "request".
    • You will use request to modify the request object, You will use response to modify the response object.
    • For example, If you would like to append query params in request, You will use request. For example, If you would like to add response headers, You will user response.

Hope it helps.

View solution in original post

2 REPLIES 2

IgnoreUnresolvedVariables will use null if a variable cannot be resolved, otherwise throw an error. Presumably, the variables used in the policy are expected to be resolved.

I believe by using type as "request" it would delete your request object if createNew was true. Or in the example used, if createNew is set to true with the type as response, the status of 500 for example would be lost. The new response object will have 200.

@Bhanu Prakash ,

  • In the AssignMessage policy, Why have you used <IgnoreUnresolvedMessages> ??? It works fine without this tag at all.
    • Yes, It's an optional tag. Like said by @dane knezic If it's set to false, If any of the variables we are trying to use in the policy does not exist, processing in the API flow will stop & raises an error. If it's set to true, It will ignore the variables even if they are not present.
  • And also in <AssignTo>tag, why the value of createNew is False ? It also works fine with the value as "True".
    • If it's TRUE, It will override the input request.
    • If it's FALSE, It will append to the input request.
    • If it's TRUE & You specify the new request name like below, It will create new object that you can use to make service callouts. For example, See the video 4MV4D here.
  • In <AssignTo>tag, value of type can also be "request" instead of "response" ??? It also works fine with the value as "request".
    • You will use request to modify the request object, You will use response to modify the response object.
    • For example, If you would like to append query params in request, You will use request. For example, If you would like to add response headers, You will user response.

Hope it helps.