All Implemented Interfaces:
Serializable, Tool, ValidExecution

Business task to calculate the saturation of resources and assignment of activities. This task calculates the saturation of resources and the assignment of activities based on the assignments and the forecast details.
Since:
20.0
See Also:
  • Field Details

  • Constructor Details

    • BTCapacityPlanningSaturationCalculate

      public BTCapacityPlanningSaturationCalculate()
  • Method Details

    • execute

      protected void execute(CapacityPlanningSaturationCalculateEvent event, PoolKit poolKit) throws DAException, DAValidateException
      Description copied from class: ValidExecutionBusinessTask
      Executes the actual business logic after validation has passed.
      Specified by:
      execute in class ValidExecutionBusinessTask<CapacityPlanningSaturationCalculateEvent>
      Parameters:
      event - the input event to process
      poolKit - the PoolKit
      Throws:
      DAException - if a data access error occurs during execution
      DAValidateException - if validation fails during execution
    • calculateTotalResult

      protected BOCapacityPlanningResult calculateTotalResult(BOCapacityPlanningResult result, List<BOCapacityPlanningResultDetail> assignments, List<BOForecastResourceDetail> resourceDetails, List<BOForecastActivityDetail> activityDetails, PoolKit poolKit) throws DAException, DAValidateException
      Calculates the total result using CapacityPlanningTotalResultCalculateEvent.
      Parameters:
      result - the capacity planning result
      assignments - the assignments
      resourceDetails - the resource details
      activityDetails - the activity details
      poolKit - the pool kit
      Returns:
      the updated capacity planning result
      Throws:
      DAException - if a data access exception occurs
      DAValidateException - if a data validation exception occurs
    • calculateResourcesSaturation

      protected Map<Long,Double> calculateResourcesSaturation(List<BOForecastResourceDetail> resourceDetails)
      Calculates the saturation of resources based on the resource details and assignments.
      Parameters:
      resourceDetails - the resource details
      Returns:
      a map of resource ID to saturation value
    • getLong

      protected Long getLong(Long value)
      Gets a Long value, returning 0 if the value is null.
      Parameters:
      value - the value to check
      Returns:
      the value, or 0 if the value is null
    • calculateActivitiesAssignment

      protected Map<Long,Double> calculateActivitiesAssignment(List<BOCapacityPlanningResultDetail> assignments, List<BOForecastActivityDetail> activityDetails)
      Calculates the assignment of activities based on the assignments and the activity details.
      Parameters:
      assignments - the assignments
      activityDetails - the activity details
      Returns:
      a map of activity ID to assignment value
    • calculateResourceSaturationCategories

      protected Map<String,Long> calculateResourceSaturationCategories(Map<Long,Double> resourcesSaturation)
      Calculates the resource saturation categories based on the saturation values.
      Parameters:
      resourcesSaturation - the map of resource ID to saturation value
      Returns:
      a map of category to count
    • calculateActivityAssignmentCategories

      protected Map<String,Long> calculateActivityAssignmentCategories(Map<Long,Double> activitiesAssignment)
      Calculates the activity assignment categories based on the assignment values.
      Parameters:
      activitiesAssignment - the map of activity ID to assignment value
      Returns:
      a map of category to count
    • isValidExecution

      public boolean isValidExecution()
      Description copied from interface: ValidExecution
      Determines whether the current state is valid for execution.
      Returns:
      true if execution is valid, false otherwise