Class BpmnAggregation
java.lang.Object
org.flowable.engine.impl.variable.BpmnAggregation
- Author:
- Filip Hrisafov
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VariableInstanceEntity
aggregate
(DelegateExecution execution, DelegateExecution parentExecution, VariableAggregatorContext aggregationContext, ProcessEngineConfigurationImpl processEngineConfiguration) Create an aggregated variable instance for the given aggregation context.static VariableInstanceEntity
aggregate
(DelegateExecution execution, DelegateExecution parentExecution, VariableAggregatorContext aggregationContext, ProcessEngineConfigurationImpl processEngineConfiguration, VariableAggregator aggregator, String targetVarName) static VariableInstanceEntity
aggregateComplete
(DelegateExecution execution, DelegateExecution parentExecution, VariableAggregationDefinition aggregation, ProcessEngineConfigurationImpl processEngineConfiguration) Create an aggregated variable instance for a completed execution.static Object
aggregateOverview
(String parentExecutionId, String targetVarName, CommandContext commandContext) Aggregate an overview value for the execution and variable namestatic Object
aggregateOverviewForMultiInstance
(ExecutionEntity parentExecution, String targetVarName, ProcessEngineConfigurationImpl processEngineConfiguration) Create an overview value for a multi instance executionstatic VariableInstanceEntity
createScopedVariableAggregationVariableInstance
(String tenantId, String varName, String scopeId, String subScopeId, Object value, VariableServiceConfiguration variableServiceConfiguration) static String
getAggregationTargetVarName
(VariableAggregationDefinition aggregation, DelegateExecution execution, ProcessEngineConfigurationImpl processEngineConfiguration) static Map<String,
VariableAggregationDefinition> groupAggregationsByTarget
(DelegateExecution multiInstanceRootExecution, Collection<VariableAggregationDefinition> aggregations, ProcessEngineConfigurationImpl processEngineConfiguration) static Map<String,
List<VariableInstance>> groupVariableInstancesByName
(List<? extends VariableInstance> instances) static VariableAggregator
resolveVariableAggregator
(VariableAggregationDefinition aggregation, DelegateExecution execution) static void
sortVariablesByCounter
(List<VariableInstance> variableInstances, List<VariableInstance> counterVariableInstances)
-
Field Details
-
COUNTER_VAR_PREFIX
- See Also:
-
COUNTER_VAR_VALUE_SEPARATOR
- See Also:
-
executionId
-
-
Constructor Details
-
BpmnAggregation
-
-
Method Details
-
getExecutionId
-
aggregateComplete
public static VariableInstanceEntity aggregateComplete(DelegateExecution execution, DelegateExecution parentExecution, VariableAggregationDefinition aggregation, ProcessEngineConfigurationImpl processEngineConfiguration) Create an aggregated variable instance for a completed execution.- Parameters:
execution
- the execution which completedparentExecution
- the parent executionaggregation
- the aggregation definitionprocessEngineConfiguration
- the process engine configuration- Returns:
- the created variables (not yet saved), or
null
if no name could be resolved for the variable
-
aggregate
public static VariableInstanceEntity aggregate(DelegateExecution execution, DelegateExecution parentExecution, VariableAggregatorContext aggregationContext, ProcessEngineConfigurationImpl processEngineConfiguration) Create an aggregated variable instance for the given aggregation context.- Parameters:
execution
- the executionparentExecution
- the parent executionaggregationContext
- the aggregation contextprocessEngineConfiguration
- the process engine configuration- Returns:
- the created variables (not yet saved), or
null
if no name could be resolved for the variable
-
aggregate
public static VariableInstanceEntity aggregate(DelegateExecution execution, DelegateExecution parentExecution, VariableAggregatorContext aggregationContext, ProcessEngineConfigurationImpl processEngineConfiguration, VariableAggregator aggregator, String targetVarName) - Parameters:
execution
- the executionparentExecution
- the parent executionaggregationContext
- the aggregation contextprocessEngineConfiguration
- the process engine configurationaggregator
- the aggregator that should be used to perform the aggregationtargetVarName
- the name of the variable, nevernull
- Returns:
- the created variables (not yet saved), or
null
if no name could be resolved for the variable
-
aggregateOverview
public static Object aggregateOverview(String parentExecutionId, String targetVarName, CommandContext commandContext) Aggregate an overview value for the execution and variable name- Parameters:
parentExecutionId
- the execution for which the overview needs to be donetargetVarName
- the name of the variable- Returns:
- the aggregated variable value
-
aggregateOverviewForMultiInstance
public static Object aggregateOverviewForMultiInstance(ExecutionEntity parentExecution, String targetVarName, ProcessEngineConfigurationImpl processEngineConfiguration) Create an overview value for a multi instance execution- Parameters:
parentExecution
- the multi instance root executiontargetVarName
- the name of the variableprocessEngineConfiguration
- the process engine configuration- Returns:
- the overview value for the multi instance execution
-
createScopedVariableAggregationVariableInstance
public static VariableInstanceEntity createScopedVariableAggregationVariableInstance(String tenantId, String varName, String scopeId, String subScopeId, Object value, VariableServiceConfiguration variableServiceConfiguration) -
groupVariableInstancesByName
public static Map<String,List<VariableInstance>> groupVariableInstancesByName(List<? extends VariableInstance> instances) -
resolveVariableAggregator
public static VariableAggregator resolveVariableAggregator(VariableAggregationDefinition aggregation, DelegateExecution execution) -
sortVariablesByCounter
public static void sortVariablesByCounter(List<VariableInstance> variableInstances, List<VariableInstance> counterVariableInstances) -
groupAggregationsByTarget
public static Map<String,VariableAggregationDefinition> groupAggregationsByTarget(DelegateExecution multiInstanceRootExecution, Collection<VariableAggregationDefinition> aggregations, ProcessEngineConfigurationImpl processEngineConfiguration) -
getAggregationTargetVarName
public static String getAggregationTargetVarName(VariableAggregationDefinition aggregation, DelegateExecution execution, ProcessEngineConfigurationImpl processEngineConfiguration)
-