Some context variables are not "exported" as an Output from an encapsulated assertion

Document ID : KB000107452
Last Modified Date : 20/07/2018
Show Technical Document Details
Question:
User created an encapsulated assertion that sets some context variables. This EA is then incorporated in different Web API policies. One of the variables is defined as follows: 

rid = ${request.http.cookievalues.AL_ENV_REQUEST_ID} 

This variable is available in the policies even though "rid" is not defined as an Output in the EA. 

On the other hand, the following variables that were set in the EA 

response.cookie.overwritePath = false 
response.cookie.overwriteDomain = false 

are *not* set accordingly in the policies (the values are set to true). When I try to define these variables as Outputs in the EA, I get the following error message, so they can't be set as Outputs: 

The specified variable is already available and does not need to be listed as an output. 

Is this a bug or am I misunderstanding something? 
 
Environment:
ENV: 9.1
Answer:
You need to set the two variables outside of an EA.

-- You may want to try to set the variable in EA using the following ways: 

1. a. Rename the response.cookie.overwritePath to something else, Ex: overwritePath, and set its value by double-clicking on the variable on the EA.
   b. Rename the response.cookie. overwriteDomain to something else, Ex: overwriteDomain, and set its value by double-clicking on the variable on the EA. 
   c. Include the above 2 variables in the Output variable. ( This will get added successfully without any errors). FYR AssertionOutVariables.png snapshot
       shows the above 2 variables added as output variables. 
   d. The test policy should now be able to pick the value thats set in the context variable. 

2. a. Include the EA within the policy as a "Include Policy Fragment". 
   b. Set the context variables within the "Include Policy Fragment" : 
         response.cookie.overwritePath = false 
         response.cookie.overwriteDomain = false 
   c.Invoke the TestPolicy, the above variables values are set to "false".