good food and clean water will trigger behavior. They are egg scatterers, and will voraciously eat their own eggs and fry. Because of this it is best to set up a breeding tank, and have another tank available fro either moving the fry, or the parents.
I put latchhook mesh in a u-shape in the bottom of a small breeding tank (5g). I put a lot of moss on top of the mesh. This way, as the barbs drop the eggs, they fall through the mesh. It is easy to lift the mesh to see if there are eggs, and when there are, the parents can be removed, and the mesh lifted out to raise the fry.