Snippets in workflows
Snippets are sections of workflows that have been saved for re-use.
Snippets are created from an existing workflow by selecting the set of elements and/or Groups of interest, right-clicking on one of the selections and choosing the option Install as Snippet... from the context menu. A dialog appears showing the section of the workflow that was selected, and prompting for a name to be assigned to the Snippet (figure 14.20).
Figure 14.20: A Group and 2 additional elements from the workflow are being saved as a Snippet.
After clicking OK, the Snippet and the installed snippet will now appear in the Side Panel under the "Snippets" tab (figure 14.21)
Figure 14.21: After installing a Snippet, it is available for re-use from within the Snippets palette of the Side Panel.
Right click on an installed snippet to reveal a context menu with following options (figure 14.22):
- Add Add the Snippet to the workflow. Alternatively, drag the Snippet into the editor.
- View Open a dialog showing a schematic view of the Snippet. Note: various aspects of the Snippet are not available in this view, for example, input and output channels and Groups. To see the full details of a Snippet, add it to a workflow.
- Rename Rename the Snippet.
- Configure Step through the settings for each element with configuration options in the Snippet. Settings that are unlocked can be edited in this view.
- Uninstall Remove the Snippet.
- Export Export the Snippet to a file, for example to share with others. Snippet files (.wml) can be imported using the Import from file... button at the bottom of the Snippet palette or by dragging a Snippet file into the Snippet area of the Side Panel.
- Migrate Update elements in the Snippet (if needed).
Figure 14.22: Actions that can be taken are revealed by right-clicking on an installed Snippet.
By default, there is a single folder, "snippet", in the Snippets palette. Subfolders can be added by right-clicking on the "snippets" folder and choosing the Create new group option from the context menu. Options in the same menu support removing and renaming these subfolders.
Snippets can be dragged between folders.
