Mashups in EMML : Advanced Mashup Techniques : Defining and Using Custom Mashup Statements with Macros : <macro>
<macro>
 
<macro> Examples
One macro definition in a mashup script or another macro, or by itself or in a macro library. Macros define custom statements that can be used in mashup scripts, another macro or as custom blocks in Wires.
Note:  
Limitations in previous releases that prevented macros from calling or declaring other macros no longer apply.
Macros can contain any EMML declaration and any EMML statement.
Macros allow behavior to be parameterized. They support both input parameters and an output parameter. Macros have access only to the variables defined within the macro plus their own input parameters.
Access to macros depends on where they are defined:
*Macros declared in a mashup script or another macro are inner macros that are only accessible within that mashup or macro.
*Macros declared individually or in a macro library are reusable macros that can be used in any mashup script or macro that includes the domain for that macro. See Including Macro Domains in Mashup Scripts or Macros for more information.
Macros can also be used to define custom blocks for Wires. See Adding Custom Blocks to Presto Wires Using Macros for more information.
Reusable macros can also be defined as global macros that have no domain, but are accessible in any mashup script or macro. See Creating and Registering Macros for more information on global macros and macro domains.
Macros must have a name. You then add any EMML statements or declarations needed to accomplish the processing that the macro performs. For more information and examples, see:
*Macro Names
*Macro Inputs and Output
*Variable Access
*Macro Inputs and Dynamic Mashup Expressions
*Macro Metadata
*Macro Logic
*Calling Macros From Another Macro
Can Contain
( Declarations Group | Variables Group | Macroincludes Group | presto:presto-meta | presto:macro-meta | Statements Group | macro:custom-macro-name | presto:beginTransaction | presto:commitTransaction | presto:rollbackTransaction )+
Allowed In
mashup | operation | macros | macro
Attributes
Name
Required
Description
name
yes
The name for this macro definition. This becomes the custom statement name within the calling EMML script or macro, so macro names must be valid XML names. This is also the default block name if the macro is used as a custom block in Wires.
Macro names must be unique within the domain they belong to. They can contain ASCII letters, numerals, periods (.), underscores (_) or dashes (-). Names must start with a letter.
Copyright © 2013-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback