Class CmmnAggregation
java.lang.Object
org.flowable.cmmn.engine.impl.variable.CmmnAggregation
- Author:
- Filip Hrisafov
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VariableInstanceEntityaggregate(DelegatePlanItemInstance planItemInstance, PlanItemVariableAggregatorContext aggregationContext, CmmnEngineConfiguration cmmnEngineConfiguration) Create an aggregated variable instance for the given aggregation context.static VariableInstanceEntityaggregate(DelegatePlanItemInstance planItemInstance, PlanItemVariableAggregatorContext aggregationContext, CmmnEngineConfiguration cmmnEngineConfiguration, PlanItemVariableAggregator aggregator, String targetVarName) static VariableInstanceEntityaggregateComplete(DelegatePlanItemInstance planItemInstance, VariableAggregationDefinition aggregation, CmmnEngineConfiguration cmmnEngineConfiguration) Create an aggregated variable instance for a completed plan item.static ObjectaggregateOverview(String parentScopeId, String targetVarName, CommandContext commandContext) Aggregate an overview value for the scope and variable namestatic ObjectaggregateOverviewForRepetition(PlanItemInstanceEntity planItemInstance, RepetitionRule repetitionRule, String targetVarName, CmmnEngineConfiguration cmmnEngineConfiguration) Create an overview value for a repetition plan itemstatic VariableInstanceEntitycreateScopedVariableAggregationVariableInstance(String tenantId, String varName, String scopeId, String subScopeId, Object value, VariableServiceConfiguration variableServiceConfiguration) static StringgetAggregationTargetVarName(VariableAggregationDefinition aggregation, VariableScope parentScope, CmmnEngineConfiguration cmmnEngineConfiguration) static Map<String,VariableAggregationDefinition> groupAggregationsByTarget(VariableScope scope, Collection<VariableAggregationDefinition> aggregations, CmmnEngineConfiguration cmmnEngineConfiguration) static Map<String,List<VariableInstance>> groupVariableInstancesByName(List<? extends VariableInstance> instances) static PlanItemVariableAggregatorresolveVariableAggregator(VariableAggregationDefinition aggregation, DelegatePlanItemInstance planItemInstance) static voidsortVariablesByCounter(List<VariableInstance> variableInstances, List<VariableInstance> counterVariableInstances)
-
Field Details
-
COUNTER_VAR_PREFIX
- See Also:
-
COUNTER_VAR_VALUE_SEPARATOR
- See Also:
-
planItemInstanceId
-
-
Constructor Details
-
CmmnAggregation
-
-
Method Details
-
getPlanItemInstanceId
-
aggregateComplete
public static VariableInstanceEntity aggregateComplete(DelegatePlanItemInstance planItemInstance, VariableAggregationDefinition aggregation, CmmnEngineConfiguration cmmnEngineConfiguration) Create an aggregated variable instance for a completed plan item.- Parameters:
planItemInstance- the planItemInstance which completedaggregation- the aggregation definitioncmmnEngineConfiguration- the cmmn engine configuration- Returns:
- the created variables (not yet saved), or
nullif no name could be resolved for the variable
-
aggregate
public static VariableInstanceEntity aggregate(DelegatePlanItemInstance planItemInstance, PlanItemVariableAggregatorContext aggregationContext, CmmnEngineConfiguration cmmnEngineConfiguration) Create an aggregated variable instance for the given aggregation context.- Parameters:
planItemInstance- the planItemInstanceaggregationContext- the aggregation contextcmmnEngineConfiguration- the cmmn engine configuration- Returns:
- the created variables (not yet saved), or
nullif no name could be resolved for the variable
-
aggregate
public static VariableInstanceEntity aggregate(DelegatePlanItemInstance planItemInstance, PlanItemVariableAggregatorContext aggregationContext, CmmnEngineConfiguration cmmnEngineConfiguration, PlanItemVariableAggregator aggregator, String targetVarName) - Parameters:
planItemInstance- the planItemInstanceaggregationContext- the aggregation contextcmmnEngineConfiguration- the cmmn 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
nullif no name could be resolved for the variable
-
aggregateOverview
public static Object aggregateOverview(String parentScopeId, String targetVarName, CommandContext commandContext) Aggregate an overview value for the scope and variable name- Parameters:
parentScopeId- the id of the scope for which the overview needs to be donetargetVarName- the name of the variable- Returns:
- the aggregated variable value
-
aggregateOverviewForRepetition
public static Object aggregateOverviewForRepetition(PlanItemInstanceEntity planItemInstance, RepetitionRule repetitionRule, String targetVarName, CmmnEngineConfiguration cmmnEngineConfiguration) Create an overview value for a repetition plan item- Parameters:
planItemInstance- one of the repetition plan item instancestargetVarName- the name of the variablecmmnEngineConfiguration- the cmmn engine configuration- Returns:
- the overview value for repetition plan items
-
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 PlanItemVariableAggregator resolveVariableAggregator(VariableAggregationDefinition aggregation, DelegatePlanItemInstance planItemInstance) -
sortVariablesByCounter
public static void sortVariablesByCounter(List<VariableInstance> variableInstances, List<VariableInstance> counterVariableInstances) -
groupAggregationsByTarget
public static Map<String,VariableAggregationDefinition> groupAggregationsByTarget(VariableScope scope, Collection<VariableAggregationDefinition> aggregations, CmmnEngineConfiguration cmmnEngineConfiguration) -
getAggregationTargetVarName
public static String getAggregationTargetVarName(VariableAggregationDefinition aggregation, VariableScope parentScope, CmmnEngineConfiguration cmmnEngineConfiguration)
-