Stop the water
The contractor finds the source: a burst supply line, a failed fixture, an attic AC drain or the roof. For plumbing, the plumbing work is handled by the right trade and scheduled so it's done before the ceiling is closed. For roofs in active rain, the emergency tarping work is handled by the right trade and scheduled so it's done before the ceiling is closed.