class RetryProcessAdditionalAction implements AdditionalProcessAction {

    @Override
    public void executeAdditionalProcessAction(String processInstanceId) {
        List<String> failedActivityIds = findFailedActivityIds(processInstanceId);
        for (String failedActivityId : failedActivityIds) {
            progressMessageService.createQuery()
                                  .processId(processInstanceId)
                                  .taskId(failedActivityId)
                                  .type(ProgressMessageType.ERROR)
                                  .delete();
        }
    }

    @Inject public  RetryProcessAdditionalAction(FlowableFacade flowableFacade, ProgressMessageService progressMessageService);

}