Sling Pipes Examples for Manifold
Container Pipes have limitation that the sequential sub-pipes are skipped on very first encounter of a void pipe.
Void pipe may be some pipe that didn't produce any output may be due to action input was not valid ie lets say a base path accessing a property will be null in case the property is not available in this case such ppe will be a void pipe and prevent any subsequent pipe defined.
Manifold helps solve above issue if despite the fact the first pipe set worked or not we want rest to work kind of parallel execution.
As per sling documentation:
"Container pipe chains sub pipes and will stop when any subpipe produces no output, the manifold pipe handles subpipes as independent streams and combines their output regardless of any void subpipe output"
Manifold aids in having parallel execution that too with further flexibility on control of parallel threads to execute sub pipes.
In case all sub pipes are manipulating properties in same metadata node, to avoid any exception we would like to have single thread operation to guarantee execution of all valid pipes.
Documentation states property name as 'numThread' however its 'numThreads' which is used to control this. default thread count is 5.
As per sling documentation:numThread
thread pool size for the execution of the subpipes, default is 5 - resource output will be ordered randomly; setting it to 1 will guarantee serial execution with predictable output order (i.e. the first subpipe resources will be exhausted before the second subpipe resources are output etc.); setting numThreads to 1 will have similar effects to using a container pipe, with the notable exception of output termination