Class CmmnAggregation

java.lang.Object
org.flowable.cmmn.engine.impl.variable.CmmnAggregation

public class CmmnAggregation extends Object
Author:
Filip Hrisafov
  • Field Details

  • Constructor Details

    • CmmnAggregation

      public CmmnAggregation(String planItemInstanceId)
  • Method Details

    • getPlanItemInstanceId

      public String getPlanItemInstanceId()
    • aggregateComplete

      public static VariableInstanceEntity aggregateComplete(DelegatePlanItemInstance planItemInstance, org.flowable.cmmn.model.VariableAggregationDefinition aggregation, CmmnEngineConfiguration cmmnEngineConfiguration)
      Create an aggregated variable instance for a completed plan item.
      Parameters:
      planItemInstance - the planItemInstance which completed
      aggregation - the aggregation definition
      cmmnEngineConfiguration - the cmmn 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(DelegatePlanItemInstance planItemInstance, PlanItemVariableAggregatorContext aggregationContext, CmmnEngineConfiguration cmmnEngineConfiguration)
      Create an aggregated variable instance for the given aggregation context.
      Parameters:
      planItemInstance - the planItemInstance
      aggregationContext - the aggregation context
      cmmnEngineConfiguration - the cmmn 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(DelegatePlanItemInstance planItemInstance, PlanItemVariableAggregatorContext aggregationContext, CmmnEngineConfiguration cmmnEngineConfiguration, PlanItemVariableAggregator aggregator, String targetVarName)
      Parameters:
      planItemInstance - the planItemInstance
      aggregationContext - the aggregation context
      cmmnEngineConfiguration - the cmmn engine configuration
      aggregator - the aggregator that should be used to perform the aggregation
      targetVarName - the name of the variable, never null
      Returns:
      the created variables (not yet saved), or null if 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 done
      targetVarName - the name of the variable
      Returns:
      the aggregated variable value
    • aggregateOverviewForRepetition

      public static Object aggregateOverviewForRepetition(PlanItemInstanceEntity planItemInstance, org.flowable.cmmn.model.RepetitionRule repetitionRule, String targetVarName, CmmnEngineConfiguration cmmnEngineConfiguration)
      Create an overview value for a repetition plan item
      Parameters:
      planItemInstance - one of the repetition plan item instances
      targetVarName - the name of the variable
      cmmnEngineConfiguration - the cmmn engine configuration
      Returns:
      the overview value for repetition plan items
    • createScopedVariableAggregationVariableInstance

      public static VariableInstanceEntity createScopedVariableAggregationVariableInstance(String varName, String scopeId, String subScopeId, Object value, VariableServiceConfiguration variableServiceConfiguration)
    • groupVariableInstancesByName

      public static Map<String,List<org.flowable.variable.api.persistence.entity.VariableInstance>> groupVariableInstancesByName(List<? extends org.flowable.variable.api.persistence.entity.VariableInstance> instances)
    • resolveVariableAggregator

      public static PlanItemVariableAggregator resolveVariableAggregator(org.flowable.cmmn.model.VariableAggregationDefinition aggregation, DelegatePlanItemInstance planItemInstance)
    • sortVariablesByCounter

      public static void sortVariablesByCounter(List<org.flowable.variable.api.persistence.entity.VariableInstance> variableInstances, List<org.flowable.variable.api.persistence.entity.VariableInstance> counterVariableInstances)
    • groupAggregationsByTarget

      public static Map<String,org.flowable.cmmn.model.VariableAggregationDefinition> groupAggregationsByTarget(org.flowable.variable.api.delegate.VariableScope scope, Collection<org.flowable.cmmn.model.VariableAggregationDefinition> aggregations, CmmnEngineConfiguration cmmnEngineConfiguration)
    • getAggregationTargetVarName

      public static String getAggregationTargetVarName(org.flowable.cmmn.model.VariableAggregationDefinition aggregation, org.flowable.variable.api.delegate.VariableScope parentScope, CmmnEngineConfiguration cmmnEngineConfiguration)