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 © 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback