Hi @Martin Williams,
As I already mentioned in my comment on the stackoverflow.com, you need to add an additional Sequence container to the Control Flow. Without it the actual Task cannot control on its own what to do unless it is a Script Task,
You can put an empty Sequence container just before your real Task in the Control Flow. A Precedence constraint between them needs to check if a boolean parameter IsProd is True.