Lists and Iterations
This video shows Taverna's implicit iteration mechanism. As a workflow runs, it will automatically iterate over each item of data. In this example, rat and mouse homologues are identified and aligned with each gene on a given human chromosome. You can track the progress of iterations from the Progress Report tab in the Result Perspective.
When lists of data items are merged, however, you need to specify how this should be done. This workflow demonstrates the difference between combining lists by dot and cross products. This service combines a list of animal names and colours. To see the current list handling setting, go to the Details tab in the Workflow Explorer and expand List Handling. It is set to use the dot product which means item 1 of list 1 is combined with item 1 of list 2. Change this to cross product and run the workflow again. This time, you get all against all combination of list items.
This video shows setting retries on services. Sometimes services can fail. If you are iterating over large data, one failed invocation can cause problems later in the workflow as an error will be passed downstream. In this workflow the service will be invoked only once for each iteration.
We can make this workflow more robust by increasing the number of retries for each invocation. In the Details tab, expand Advanced and click the Configure button under Retry. Change it to 5 and run the workflow again. This time there are no failures – each iteration has 5 chances to complete successfully.
Video (needs voiceover+captions+text):
This video shows an example of an asynchronous workflow. When the InterProScan service is invoked, a jobID is returned. get_XML_result service returns the results, but only when the job is finished. checkStatus service reports when the job is finished. We need to run get_XML_result service only after checkStatus reports that the job is finished. To do so, we can set a control link to ensure that get_XML_result will only be invoked after checkStatus is finished.
To set a control link, select get_XML_result and right-click. Select "Run after" from the pop-up menu and set it to run after checkStatus. There is no data passing between checkStatus and get_XML_result services, but get_XML_result is now dependent on checkStatus.
Parallel Service Invocation
This video shows how to set up parallel invocations of a service. Taverna has an implicit iteration mechanism. If there is no dependency between the data items, you can speed up the execution by invoking iterations in parallel.
To set parallel execution, select the service and go to the Details tab. Click on Advanced to expand it and and click the Configure button under Parallelize. Change the number to 10 and run the workflow. SearchSimple_2, with 10 parallel jobs, runs much quicker than the other identical service. SearchSimple_2 finishes 10 iterations in the same time it takes SearchSimple to do one.