Information Flow and Entropy Production on Bayesian Networks