public boolean doBuildConfiguration(MatrixBuild b, MatrixConfiguration c) {
    MatrixSubsetAction a = b.getAction(MatrixSubsetAction.class);
    if (a == null) return true;

    // run the filter and restrict the subset to run
    return c.getCombination().evalScriptExpression(b.getParent().getAxes(), a.getFilter());
  }
  @Override
  public CauseOfBlockage canRun(Queue.Item item) {
    // Skip locking for multiple configuration projects,
    // only the child jobs will actually lock resources.
    if (item.task instanceof MatrixProject) return null;

    AbstractProject<?, ?> project = Utils.getProject(item);
    if (project == null) return null;

    LockableResourcesStruct resources = Utils.requiredResources(project);
    if (resources == null || (resources.required.isEmpty() && resources.label.isEmpty())) {
      return null;
    }

    int resourceNumber;
    try {
      resourceNumber = Integer.parseInt(resources.requiredNumber);
    } catch (NumberFormatException e) {
      resourceNumber = 0;
    }

    LOGGER.finest(project.getName() + " trying to get resources with these details: " + resources);

    if (resourceNumber > 0 || !resources.label.isEmpty()) {
      Map<String, Object> params = new HashMap<String, Object>();
      if (item.task instanceof MatrixConfiguration) {
        MatrixConfiguration matrix = (MatrixConfiguration) item.task;
        params.putAll(matrix.getCombination());
      }

      List<LockableResource> selected =
          LockableResourcesManager.get()
              .queue(resources, item.id, project.getFullName(), resourceNumber, params, LOGGER);

      if (selected != null) {
        LOGGER.finest(project.getName() + " reserved resources " + selected);
        return null;
      } else {
        LOGGER.finest(project.getName() + " waiting for resources");
        return new BecauseResourcesLocked(resources);
      }

    } else {
      if (LockableResourcesManager.get().queue(resources.required, item.id)) {
        LOGGER.finest(project.getName() + " reserved resources " + resources.required);
        return null;
      } else {
        LOGGER.finest(project.getName() + " waiting for resources " + resources.required);
        return new BecauseResourcesLocked(resources);
      }
    }
  }