A nested workflow is a workflow within a workflow.
A nested workflow is just another kind of service that can be added to a workflow, except that instead of it being a black box, it is a white box so you can see what is happening inside. Nested workflow contains other services inside that together perform a certain functionality and has input and output ports just any other service. So, if you are not interested in details of a nested workflow - you can just treat it as a black box that does something that you need.
It is often the case that a workflow designed for one purpose can be used again for other experiments and can be imported or merged into another workflow. Nested workflows encourage reuse and modular workflow design.
Alternatively, in the menu, click Insert -> Nested workflow.
Various options on how you can add or import a nested workflow are:
By adding a new (blank) nested workflow to your Workflow Diagram, you get an empty placeholder where you can create your nested workflow functionality. To add a new workflow:
To import a nested workflow from a file:
This is similar to importing a nested workflow from a file. To import a nested workflow from a URL:
This is similar to importing a nested workflow from a file or a URL. To import a nested workflow from a list of workflows currently opened in the Workbench:
Once you have added a new blank or imported an existing nested workflow to your Workflow Diagram, you can then edit it. To edit a nested workflow:
Once you have finished editing the nested workflow (and probably in the meantime as well) - save it by clicking the save icon in the toolbar or from the top menu choose File -> Save. You can also close the nested workflow an go back to your original workflow.
Saving the nested workflow saves it into the original workflow where the nested workflow was added to. It does not save it to a separate file. However, if you select "Save as" option and save the nested workflow to a file - the link to the containing wokflow is lost.
A nested workflow is normally shown in a pale blue rectangle in the Workflow Diagram. Inside it, you can see its composing services. This view actually shows the nested workflow as a white box. To hide (collapse) a nested workflow and show it as a black box:
You can also merge a workflow into the current workflow. This effectively copies all services, ports and links from the source workflow directly into the destination workflow. This can be useful for copying smaller workflow fragments but you loose the modularity as the copied services are not part of a nested workflow but are “blended” in the current workflow. For inclusion of larger workflows inserting them as a nested workflow may be more beneficial.
Similarly to inserting nested workflows, you can merge a workflow:
To merge a workflow: