Adaptable Pervasive Flows: Towards a More Intelligent Environment