Mashups in Presto Wires : Creating Mashups in Wires : Add a Mashup or Mashable in a Loop
Add a Mashup or Mashable in a Loop
Loop Block Video rectLoop Block Video
Use the Loop action block to add mashup or mashable results in a repeating loop in your mashup.
The input to this block must have a set of repeating items that control looping. Each repeating item in the input runs the mashup or mashable in one loop and may also be used to provide inputs to the mashup or mashable. The loop ends when the last repeating item is processed.
The final results for the block, in most cases, consist of all the results from each loop. You can, however, simply add the results from each loop to the corresponding repeating item in the input to the block.
1. Add Loop to the canvas and connect a document-type result with at least one repeating node as the input to this block.
2. If needed, set the Select Repeating Element property to point to the repeating node to define this loop.
If there is only one repeating node from the input, this property defaults to that. You can also click to open the Path Selector list and find the appropriate repeating node. See Select Fields or Paths for Block Properties with the Path Selector for instructions.
3. If needed, change the Result Method.
*Append is the default method for adding in the mashup or mashable results from each loop. Each loop result appears as a separate 'item' in the accumulated results for this block.
*Merge combines the results of each loop into a single 'item' rather than separate items. Merged results can be more uniform, but also obscure which portions of the accumulated result came from a specific loop.
*Annotate Source takes the results of each loop and adds that as a child to the corresponding repeating item in the input to the Loopblock. Thus the final result of the block is the input document annotated with the loop results.
4. For appended results, you change the name of the root node wrapping all loop results in the Results Name property.
This defaults to result.
5. If the results of your mashup or mashable information source can have different structures, enter the name of the node within the results where they should be merged in Merge On.
Note:  
If the output of the mashup or mashable does not vary, simply leave this field blank.
6. Add the mashup or mashable to invoke in the Operation to invoke for each item canvas:
a. Find and select the mashup or mashable you want in the Block Menus.
See Quickly Find Mashables, Mashups or Other Blocks for search tips.
This opens a list of operations for this mashable or mashup in the Block Menu.
b. Drag the operation into the canvas in the Loop block properties.
The canvas disappears and information on the mashup/mashable operation displays. If this mashup or mashable has input parameters, new properties open for these parameters.
You can also use the Clear button to remove this mashup or mashable.
7. Complete the input parameters, if any, for the mashup or mashable you have added to the loop.
In many cases, you provide input parameters for the mashup or mashable from values in the repeating item that defines the loop, although this is not required. Enter values or use the Path Selector list to complete input parameters just as you normally would.
Copyright © 2013-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback