Class JsonVariableAggregator
- java.lang.Object
-
- org.flowable.engine.impl.delegate.JsonVariableAggregator
-
- All Implemented Interfaces:
VariableAggregator
public class JsonVariableAggregator extends Object implements VariableAggregator
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected ProcessEngineConfigurationImplprocessEngineConfiguration
-
Constructor Summary
Constructors Constructor Description JsonVariableAggregator(ProcessEngineConfigurationImpl processEngineConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectaggregateMultiVariables(DelegateExecution execution, List<? extends org.flowable.variable.api.persistence.entity.VariableInstance> instances, VariableAggregatorContext context)Aggregated the provided variable instances into one variable value.ObjectaggregateSingleVariable(DelegateExecution execution, VariableAggregatorContext context)Create a single variable value based on the provided aggregation definition.
-
-
-
Field Detail
-
processEngineConfiguration
protected final ProcessEngineConfigurationImpl processEngineConfiguration
-
-
Constructor Detail
-
JsonVariableAggregator
public JsonVariableAggregator(ProcessEngineConfigurationImpl processEngineConfiguration)
-
-
Method Detail
-
aggregateSingleVariable
public Object aggregateSingleVariable(DelegateExecution execution, VariableAggregatorContext context)
Description copied from interface:VariableAggregatorCreate 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.- Specified by:
aggregateSingleVariablein interfaceVariableAggregator- Parameters:
execution- the delegate execution from where we need to get data fromcontext- the aggregation context- Returns:
- the value for the aggregated variable
-
aggregateMultiVariables
public Object aggregateMultiVariables(DelegateExecution execution, List<? extends org.flowable.variable.api.persistence.entity.VariableInstance> instances, VariableAggregatorContext context)
Description copied from interface:VariableAggregatorAggregated 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.- Specified by:
aggregateMultiVariablesin interfaceVariableAggregator- 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 fromVariableAggregator.aggregateSingleVariable(DelegateExecution, VariableAggregatorContext))context- the aggregation context- Returns:
- the aggregated value
-
-