List depth specifies the granularity of a port, like single value (0), list of values (1), list of lists (2), etc.
Services in Taverna can receive multiple inputs, and each input port is declared to be of a given list granularity, which we in Taverna call list depth. Most service inputs expect a single value (depth 0), while others expect a list of values (depth 1), and a minority expect deeper lists like list of lists of values (depth 2). There is a requirement for lists to be of uniform depth, so a list of list of values (depth 2) must contain only lists of values (depth 1), it cannot include individual values directly, or have deeper lists, as the content of the list must all have the same depth.
The reason for this restriction is that Taverna can perform Implicit iteration.
Specifying depth on workflow input ports
When creating a workflow input port, you will be required to choose the granularity of that port, which affects how deep lists the user can input when running the workflow, but also how deep lists will be passed into the workflow when used as a nested workflow.
Specifying list depth when adding a workflow input port
When running a workflow, the run dialogue enforces the depth restriction.
Entering a single value (depth 0)
Adding multiple values (list depth 1) - notice that you can combine values, files and URLs in the same list
Providing list of lists (depth 2) - notice how the lists can have different number of elements, the second list in this case is actually empty
Similarly, when specifying ports for services like Beanshell or Rshell, you can specify the depth, which would affect whether inside the script you deal with a
java.util.List<String> or deeper lists like
If you connect a service output or workflow input with a depth higher than expected, say giving a list to a service expecting a single value, Taverna will perform implicit iteration over the values in the list - producing a new list of outputs.