Integrate Software AG Products Using Digital Event Services 10.4 | Integrate Software AG Products Using Digital Event Services | MashZone NextGen Help | Appendix | Legacy Presto components | Mashables and Mashups | Mashups in EMML | Advanced Mashup Techniques | Defining and Using Custom Mashup Statements with Macros | Calling a Macro | Receiving Macro Results
 
Receiving Macro Results
If the macro has results, the macro reference statement you use to call the macro also has an implicit outputvariable attribute that allows you use to identify the variable in your mashup script or macro that should receive the macro results.
In the example shown below, the results of the macro are accessible inside the macro in the $macroResult variable.
<macro name="myMacroWithResults"
xmlns:presto="http://www.jackbe.com/v1.0/EMMLPrestoExtensions"
xmlns:macro="http://www.openmashup.org/schemas/v1.0/EMMLMacro">

<input name="email" type="string" />
<input name="message" type="string" />
<output name="macroResult" type="string"/>
<assign fromexpr="concat($message,', ',$email)"
tovariable="$macroResult"/>
</macro>
...
<macro:myMacroWithResults email="myTeam@myOrg.com"
message="Hello" outputvariable="myResults"/>
<display message="Macro message is" variable="$myResults"/>
...
In this example, the macro results are placed in the $myResults variable identified in the outputvariable attribute when the macro is called.

Copyright © 2019 | 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