Interface VariableAggregator


public interface VariableAggregator
An interface that can be used to aggregate multiple variables into a single one based on an aggregation definition.
Author:
Filip Hrisafov
  • Method Details

    • aggregateSingleVariable

      Object aggregateSingleVariable(DelegateExecution execution, VariableAggregatorContext context)
      Create a single variable value based on the provided aggregation definition. This is called after a single child multi instance execution is completed, or an overview for a child multi instance execution is needed.
      Parameters:
      execution - the delegate execution from where we need to get data from
      context - the aggregation context
      Returns:
      the value for the aggregated variable
    • aggregateMultiVariables

      Object aggregateMultiVariables(DelegateExecution execution, List<? extends org.flowable.variable.api.persistence.entity.VariableInstance> instances, VariableAggregatorContext context)
      Aggregated the provided variable instances into one variable value. This is called when a multi instance execution and all its children is complete, or an overview for a multi instance execution is needed.
      Parameters:
      execution - the delegated execution for which we need to do the aggregation
      instances - the variable values that should be aggregated (these variables are created based on the value from aggregateSingleVariable(DelegateExecution, VariableAggregatorContext))
      context - the aggregation context
      Returns:
      the aggregated value