Service composition in stochastic settings