Skip to end of metadata
Go to start of metadata

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.

Tutorial

Adding a Nested Workflow

  1. Expand Service templates under Available services in the Service Panel.
  2. Select Nested Workflow.
  3. Drag and drop the Nested Workflow to the Workflow Diagram.
  4. In a dialog that pops up, you will have several options on how to import a nested workflow as explained next.

Alternatively, in the menu, click Insert -> Nested workflow.

Various options on how you can add or import a nested workflow are:

  • Add a new workflow (a blank nested worklow) that you intend to edit yourself.
  • Import a workflow from a file on your disk as a nested workflow to your Workflow Diagram. You may edit the imported workflow if you like.
  • Import a workflow from a URL as a nested workflow to your Workflow Diagram. You may edit the imported workflow if you like.
  • Import an already opened workflow in the Workbench as a nested workflow to your Workflow Diagram. You may edit the imported workflow if you like.

Add a new (blank) nested workflow

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:

  1. Select the New workflow option in the Workflow import dialog.

Import a nested workflow from file

To import a nested workflow from a file:

  1. Select the Import from file option from the Import workflow dialog.
  2. In the File Chooser dialog that pops up, select the workflow file you want to import as nested workflow.

Import a nested workflow from URL

This is similar to importing a nested workflow from a file. To import a nested workflow from a URL:

  1. Select the Import from URL option from the Import workflow dialog.
  2. Enter the URL of the workflow file you want to import as nested in the text box.

Import an already opened workflow as nested workflow

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:

  1. Select the Already opened workflow option from the Import workflow dialog.
  2. From a drop-down list select the workflow you want to import as nested.

Editing a Nested Workflow

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:

  1. Right-click on the nested workflow service in the Workflow Diagram.
  2. Select Edit nested workfow...
  3. You will get a new empty Workflow Diagram where you can start editing your 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.

Showing and Hiding a Nested Workflow

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:

  1. Right click on Nested Workflow service.
  2. Select Hide nested workflow from the pop up menu.

Merging a Workflow Into the Current Workflow

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:

  • from a file on a disk
  • from a URL in the Web
  • from a workflow already opened inside the Workbench.

To merge a workflow:

  1. Select Insert from the top level menu.
  2. Select Merge workflow option.
  3. In the Import workflow dialog that pops up (similar to the one for inserting nested workflows) select which workflow you want to import.

Labels
  • None