Interface PlanItemVariableAggregator


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

      • aggregateSingleVariable

        Object aggregateSingleVariable​(DelegatePlanItemInstance planItemInstance,
                                       PlanItemVariableAggregatorContext context)
        Create a single variable value based on the provided aggregation definition. This is called after a single repeatable plan item instance is completed, or an overview for a non completed repeatable plan item instance is needed.
        Parameters:
        planItemInstance - the delegate planItemInstance from where we need to get data from
        context - the aggregation context
        Returns:
        the value for the aggregated variable
      • aggregateMultiVariables

        Object aggregateMultiVariables​(DelegatePlanItemInstance planItemInstance,
                                       List<? extends org.flowable.variable.api.persistence.entity.VariableInstance> instances,
                                       PlanItemVariableAggregatorContext context)
        Aggregated the provided variable instances into one variable value. This is called when all repeatable plan item instances are complete, or an overview for repeatable plan item instances is needed.
        Parameters:
        planItemInstance - the delegated planItemInstance 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(DelegatePlanItemInstance, PlanItemVariableAggregatorContext))
        context - the aggregation context
        Returns:
        the aggregated value