Appendix : Legacy Presto components : Mashables and Mashups : Mashups in EMML : Advanced Mashup Techniques : Using Business Analytics Attributes in Mashups : Using Business Analytics Attributes in Mashup Statements
Using Business Analytics Attributes in Mashup Statements
You can refer to Business Analytics 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-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback