Wrap an object flow middleware with it