FIX: take BarrierJob elements into account in serialization of workflows.

Not finished.