Integrate Software AG Products Using Digital Event Services : MashZone NextGen Help : Appendix : Legacy Presto components : Mashables and Mashups : Mashups in EMML : Writing Mashups in EMML : Handling or Throwing Exceptions : <return>
<return>
This statement forcibly stops all further mashup or macro processing and returns the current value of <output> as the mashup or macro result.
You don't need to supply any additional information or content for <return/>.
For examples, see Forcibly Stopping Processing in <catch> and Forcibly Stopping Mashup or Macro Processing for examples.
Can Contain
Empty
Allowed In
mashup | catch | else | elseif | for | foreach | if | macro | operation | sequence | try | while
Forcibly Stopping Mashup or Macro Processing
This example checks to ensure that filter results contain at least one row. If not, it constructs a result with an error message and uses <return/> to stop all further processing.
...
<output name="result" type="document"/>

<!-- invoke mashable and filter results to $rows variable-->

<if condition="empty($rows)">
<variable name="msg" type="string"/>
<assign fromexpr="concat('No rows meet your criteria: ',$filterBy)"
outputvariable="msg"/>
<constructor name="result">
<rows>
<error>{$msg}</error>
</rows>
</constructor>
<return/>
</if>
...
Copyright © 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback