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 Summary
Modifier and TypeMethodDescriptionaggregateMultiVariables
(DelegateExecution execution, List<? extends org.flowable.variable.api.persistence.entity.VariableInstance> instances, VariableAggregatorContext context) Aggregated the provided variable instances into one variable value.aggregateSingleVariable
(DelegateExecution execution, VariableAggregatorContext context) Create a single variable value based on the provided aggregation definition.
-
Method Details
-
aggregateSingleVariable
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 fromcontext
- 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 aggregationinstances
- the variable values that should be aggregated (these variables are created based on the value fromaggregateSingleVariable(DelegateExecution, VariableAggregatorContext)
)context
- the aggregation context- Returns:
- the aggregated value
-