You could use a CO validation to prevent postings when your specified conditions apply. Like Jorgeswara said, you will have to indicate in the system somewhere when a workcenter is "out of commission".
You need to use a CO validation as opposed to a WBS user exit because the WBS ones only trigger when you are changing a WBS and not posting to one.