MashZone NextGen 10.2 | Appendix | Legacy Presto components | Mashables and Mashups | Mashups in EMML | Advanced Mashup Techniques | Using MashZone NextGen Attributes in Mashups | Using MashZone NextGen Attributes in Mashup Statements
 
Using MashZone NextGen Attributes in Mashup Statements
You can refer to MashZone NextGen attributes in any statement where you can refer to variables. For example:
...
<variables>
<variable name="global.defaultContext" type="string"/>
<variable name="user.firstName" type="string"/>
<variable name="characters" type="document">
<customer>
<id>dog1</id>
<name>Goofy</name>
<city>Toon Town</city>
</customer>
<customer>
<id>mouse2</id>
<name>Minnie</name>
<city>Toon Town</city>
</customer>
</variable>
<variable name="session.key1" type="string"/>
<variable name="session.customerInfo" type="document"/>
<variable name="session.dogInfo" type="document" />
</variables>
...
<invoke service="myService" operation="someQuery"
inputvariables="$global.defaultContext" .../>
...
<filter filterexpr="/customer[matches(firstname, $user.firstName )] inputvariable="$allCustomers" outputvariable="thisCustomer"/>
...
<assign literal="New York Giants" outputvariable="$session.key1"/>
<assign fromvariable="$characters"
outputvariable="$session.customerInfo"/>
<assign fromexpr="$session.customerInfo/customer[@id='dog1']"
outputvariable="$session.dogInfo"/>
The <invoke> statement runs a mashable or mashup named myService which will be passed the value of the global attribute name defaultContext.
Similarly, the <filter> statement will filter out the $allCustomers variable for those customers whose first name matches the name of the current user.
The last three statements assign values to session attributes for the current user session.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release