I was just doing something similar for a little project.
Basically its a soap bubble game.
essentially it works like catweasel said.
but i have to say that working with box2D for this purpose was not very satisfactory, because it was overly complicated and hard to tweak for the desired physics behaviour. many strange behaviours had to be brought under controll with patches that restrict special cases and much time went into bringing forces and the smoothing of input data in balance.
if i had to do it again i would probably reduce the complexity of the project requirements and say its just fake physics and go for simpler collision that can be patched with standard nodes.