We deal with quasistatic evolution problems in plasticity with softening, in the framework of small strain associative elastoplasticity. The presence of a nonconvex term due to the softening phenomenon requires a nontrivial extension of the variational framework for rate-independent problems to the case of a nonconvex energy functional. We argue that, in this case, the use of global minimizers in the corresponding incremental problems is not justified from the mechanical point of view. Thus, we analyse a different selection criterion for the solutions of the quasistatic evolution problem, based on a viscous approximation. This leads to a generalized formulation in terms of Young measures, developed in the first part of the paper. In the second part we apply our approach to some concrete examples.