We will discuss the characterization of the value function for some control problems with an integral constraint. Usually, some controllability conditions are imposed to guarantee the continuity of the value function and its characterization as unique constrained-viscosity solution to a HJB equation. Here, we will mainly focus on the case where no controllability assumption is satisfied. In this case the value function is discontinuous but its epigraph can still be described by introducing an auxiliary control problem without state constraints. The theoretical results will be commented on a specific problem of optimal exercise of swing contracts in energy markets.