class SetRetryPhaseAdditionalProcessAction implements AdditionalProcessAction {

    @Override
    public void executeAdditionalProcessAction(String processInstanceId) {
        flowableFacade.getActiveProcessExecutions(processInstanceId)
                      .stream()
                      .map(this::toExecutionEntityImpl)
                      .filter(executionEntityImpl -> executionEntityImpl.getDeadLetterJobCount() > 0)
                      .map(ExecutionEntityImpl::getProcessInstanceId)
                      .forEach(this::setRetryPhaseForProcess);
    }

    @Inject public  SetRetryPhaseAdditionalProcessAction(FlowableFacade flowableFacade);

}