You can create an interative scheme in which each entity is moved out of the queue, then tested, and if it fails the test then routed back to the queue (via an Output Switch and a Path Combiner). If it passes the test then route it via the Output Switch outside the iteration loop. You can create several variations of this design pattern to implement:
- find the first entity that satisfies a predicate
- find all entities that satisfy a predicate
- find first N entities that satisfy a predicate etc.
Not the most convenient syntax, but it should work.