Consider an artifact-centric business process model, containing both a data model and a process model. When executing the process, it may happen that some of the data constraints from the data model are violated. Bearing this in mind, we propose an approach to automatically generate an extension to the original business process model that, when executed after a constraint violation, repairs the contents of the data leaving it in a new consistent state.