Dennis Neumann raised on 2010-02-02 on taverna-hackers the need for a shim that can create a list.
The usecase is if you have a service with two output ports giving lists [a1,a2,a3,a4,a5,..] and [b1,b2,b3,b4,b5,..], but the user needs a shim that creates a list of lists of the tuples [ [a1,b1], [a2,b2], [a3,b3], ... ].
This works similar to a merge, but the difference is that you get a kind of 'inner merge' instead of [ [a1,a2,a3,a4,a5], [b1,b2,b3,b4,b5] ].
The shim should ideally be pipelining, so if a1 and b1 has been received, [a1, b1] can be pushed out.
A beanshell version can be seen at http://www.myexperiment.org/workflows/1826/versions/1.html - but this is not ideal, because:
- User needs to modify script and input ports for additional ports in the inner list.
- User needs to modify port depths for list creation of higher depths (tuples of lists)
- User need to make sure List Handling is Dot product (to avoid [a1,a2], etc)
As mention in the thread, it's also possible to implement this using nested workflow with depth 0-inputs and a merge to the output port.
The shim should ideally work similar to a merge, so that the user could just connect additional links to it and the correct ports added. Engine-wise this should not be implemented as a Beanshell script/Local worker, as that would require full derefencing and re-registration of the individual data.