16.2.2 Advanced document management

Grouping and separating documents

In simple Workflows all documents provided to the Workflow are grouped as a single set of documents which are used as input to a single invocation of the first Step in the Workflow. Each Workflow Step will produce one or more output documents, all of which are grouped together and used as input into the next Step in the Workflow.

However, it is possible to create Workflows where each Step in the Workflow may be invoked in parallel on different sets of documents. For example, if the first Step in the Workflow uses the For Each Sequence / Extract Sequences From List Step, then each input sequence is placed into a separate document and the following Step will be invoked independently on each sequence. Each call to the following Step may produce one or more documents. Each of these sets of output documents are used independently as inputs to multiple invocations of the next Workflow Step. Alternatively you could group these results together again, using Group sequences or Group Documents to use as input to a single call to the next Workflow Step. No matter what document grouping or separation (For Each...) Operations are used, each Step in the Workflow is always run to completion on all data sets before starting on the next Step in the Workflow.

Inputting documents into later stages of a Workflow

It is also possible to insert documents into later stages of the workflow, either from additional documents the user selects in the options when they first start the workflow (using the Add document chosen when running workflow Step) or to use documents generated from earlier stages in the workflow (using the Combine With Earlier Document(s) Step). You can create branches in your workflows by using the Save Documents / Branch Step often in conjunction with a Filter Documents Step as the first Step in each branch. For an example on branching and filtering, see the sample ’Identify Organism’ Workflow.