class CatalogProvUtilsImpl implements CatalogProvUtils {

    @Override
    public DeleteActivity startDeleteActivity(User user, Resource recordIri) {
        Entity recordEntity = entityFactory.getExisting(recordIri, asModel(provenanceService.getConnection()
                .getStatements(recordIri, null, null), modelFactory))
                .orElseGet(() -> {
                    LOG.warn("No Entity found for record " + recordIri + ".");
                    Entity entity = entityFactory.createNew(recordIri);
                    entity.addProperty(vf.createLiteral(config.getRepositoryId()), vf.createIRI(atLocation));
                    return entity;
                });

        ActivityConfig config = new ActivityConfig.Builder(Collections.singleton(DeleteActivity.class), user)
                .invalidatedEntity(recordEntity)
                .build();
        Activity activity = initializeActivity(config);

        provenanceService.addActivity(activity);

        return deleteActivityFactory.getExisting(activity.getResource(), activity.getModel()).orElseThrow(() ->
                new IllegalStateException("DeleteActivity not made correctly"));
    }

}