Mashups in MashZone NextGen Wires : Customizing Wires : Adding Custom Blocks to MashZone NextGen Wires Using Macros : Configure Properties for Custom Blocks
Configure Properties for Custom Blocks
By default, all macros generate custom blocks in Wires unless you explicitly exclude them. See Macro Metadata for instructions on how to exclude macros from Wires.
If no additional configuration is provided with a macro, Wires generates a default block for the Block Menus and the canvas. It also generates a default block properties form with fields for each input parameter in the macro. See Default Custom Block With No Configuration for details on these defaults.
You can configure certain visual aspects or behavior for a custom block in Wires, using the <presto:macro-meta> statement in the macro, including:
*Update Labels and Icons for Custom Blocks in Wires
*Change the order of properties. This is defined by the order that <input> statements are defined in the macro. Simply update the EMML to change the order of properties in the custom block.
*Add Tooltips and Help in Custom Blocks
*Make Custom Block Properties Required
*Configure Field and Line Sizes for Custom Block Properties
*Configure Strings, Numbers, Dates or Boolean Properties in Custom Blocks
*Limit Custom Block User Entries to a List of Values
*Configure Dynamic Path Choices and Results for Custom Blocks
*Advanced Custom Block and Property Configuration
Default Custom Block With No Configuration
Macros that have no metadata for custom block configuration use the default Gear icon in Wires. The macro name becomes the label for block:
Macros appear in the Blocks tab in a category with their domain name or category named Macros if they have no domain.
The block properties form has a label and a property field for each input parameter in the macro, listed in the order in which <input> statements appear within the macro. Default property labels are the input parameter name:
Property fields are the same for all input parameters, regardless of their datatype: a combination of a single-line input field with the Path Selection button.
*For input parameters with any simple datatype, users can enter literal values in the block property.
*For input parameters with a document datatype, users can only select the results from an existing block in the mashup.
*For input parameters of any type, they can select dynamic values from the Path Selection list using input parameters for the mashup, any MashZone NextGen attribute or any node from the results of any block in the mashup:
There are no tooltips for the block or properties and no help available for the block. Limited validation is applied to user entries for properties, based on the datatype for the corresponding macro input parameter.
You can configure a variety of these aspects for custom blocks using the <presto:macro-meta> MashZone NextGen extension statement. The basic requirements for <presto:macro-meta> include a <block> child that defines the usage for this macro:

<macros xmlns="http://www.open-mashup.org/schemas/v1.0/EMML"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openmashup.org/schemas/v1.0/EMML/..
/schemas/EMMLPrestoSpec.xsd"
domain="myBlocks">

<macro name="helloWorld"
xmlns:presto="http://www.jackbe.com/v1.0/EMMLPrestoExtensions"
xmlns:macro="http://www.openmashup.org/schemas/v1.0/EMMLMacro">
<presto:macro-meta>
<block usage="Wires"/>
</presto:macro-meta>
....
</macro>
...
</macros>
This example explicitly declares that the helloWorld macro is meant to produce a custom block in Wires in a menu category named myBlocks. See Macro Metadata for instructions on excluding macros from Wires.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback