docs: public static Function<DeploymentUnit, Boolean> checkActiveProcessInstances(final RuntimeDataService runtimeDataService) {
          return unit -> {
              Collection<ProcessInstanceDesc> activeProcesses = runtimeDataService.getProcessInstancesByDeploymentId(unit.getIdentifier(), activeProcessInstancessStates, new QueryContext());
              if (!activeProcesses.isEmpty()) {
                  throw new IllegalStateException("Undeploy forbidden - there are active processes instances for deployment " + unit.getIdentifier());
              }
              return true;
          };
      }