In this paper we consider the problem of planning paths for articulated bodies operating in workplaces containing obstacles and regions with preferences expressed as degrees of desirability. Degrees of desirability could specify danger zones and desire zones. A planned path should not collide with the obstacles and should maximize the degrees of desirability. Region desirability can also convey search-control strategies guiding the exploration of the search space. To handle desirability specifications, we introduce the notion of flexible probabilistic roadmap (flexible PRM) as an extension of the traditional PRM. Each edge in a flexible PRM is assigned a desirability degree. We show that flexible PRM planning can be achieved very efficiently with a simple sampling strategy of the configuration space defined as a trade-off between a traditional sampling oriented toward coverage of the configuration space and a heuristic optimization of the path desirability degree. For path planning problems in dynamic environments, where obstacles and region desirability can change in real time, we use dynamic and anytime search exploration strategies. The dynamic strategy allows the planner to replan efficiently by exploiting results from previous planning phases. The anytime strategy starts with a quickly computed path with a potentially low desirability degree which is then incrementally improved depending on the available planning time.