code: @Override
    public ScoreWeight processWidgetScore(Widget widget, ScoreComponentSettings paramSettings) {
  
      if (!Utils.isScoreEnabled(paramSettings)) {
        return null;
      }
  
      //1. Init scores
      ScoreWeight scoreWidget = initWidgetScore(paramSettings);
  
      if (null == widget) {
        scoreWidget.setScore(paramSettings.getCriteria().getNoWidgetFound());
        scoreWidget.setState(ScoreWeight.ProcessingState.criteria_failed);
        scoreWidget.setMessage(Constants.SCORE_ERROR_NO_WIDGET_FOUND);
        processWidgetScoreChildren(scoreWidget);
        return scoreWidget;
      }
  
      //Set Reference Id as Widget Id
      scoreWidget.setRefId(widget.getId());
  
      //2. Calculate scores for each child category
      try {
        calculateCategoryScores(widget, paramSettings, scoreWidget.getChildren());
      } catch (DataNotFoundException ex) {
        scoreWidget.setState(ScoreWeight.ProcessingState.criteria_failed);
        scoreWidget.setScore(paramSettings.getCriteria().getNoDataFound());
        scoreWidget.setMessage(ex.getMessage());
        processWidgetScoreChildren(scoreWidget);
        return scoreWidget;
      } catch (ThresholdException ex) {
        setThresholdFailureWeight(ex, scoreWidget);
        processWidgetScoreChildren(scoreWidget);
        return scoreWidget;
      }
  
      LOGGER.debug("scoreWidget {}", scoreWidget);
      LOGGER.debug("scoreWidget.getChildren {}", scoreWidget.getChildren());
      //3. Calculate widget score
      calculateWidgetScore(scoreWidget);
      return scoreWidget;
    }
docs: Process widget score
  
  @param widget widget configuration from dashboard
  @param paramSettings Score Settings for the widget
  @return