Presto Session Attributes
Presto session attributes use the reserved variable name session. So you declare session attributes as session.attribute-name, just as you would with any variable.
The values for session attributes, however, can also be set in two ways:
Using the
x-p-sessionbinding Presto Header/Parameter in requests to the
Presto Server to save specific data from a mashable or mashup response as a session attribute.
You can send this as an HTTP header or as a parameter using Presto Connect.. You cannot set this header information in <invoke> commands within a mashups script.
Within the <variable> statement in a mashup script that also declares the variable.
If this session attribute does not already exist, the <variable> statement creates a new session attribute. If you assign a default value or construct the variable using literal XML, that value or node set is assigned to the Presto session attribute.
You can also use the <assign> command in a mashup script to update or assign values to Presto session attributes. The output variable in <assign> simply uses the $session.attribute-name syntax.
Once Presto session attributes exist, you can use them in mashup scripts just like any other variable, using the syntax $session.attribute-name.
Presto session attributes can also hold sets of nodes, unlike user or global parameters. You can use XPath expressions after the attribute name to point to specific nodes within the session attribute.