Class BpmnAggregation

java.lang.Object
org.flowable.engine.impl.variable.BpmnAggregation

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

  • Constructor Details

    • BpmnAggregation

      public BpmnAggregation(String executionId)
  • Method Details

    • getExecutionId

      public String getExecutionId()
    • aggregateComplete

      public static VariableInstanceEntity aggregateComplete(DelegateExecution execution, DelegateExecution parentExecution, org.flowable.bpmn.model.VariableAggregationDefinition aggregation, ProcessEngineConfigurationImpl processEngineConfiguration)
      Create an aggregated variable instance for a completed execution.
      Parameters:
      execution - the execution which completed
      parentExecution - the parent execution
      aggregation - the aggregation definition
      processEngineConfiguration - 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 execution
      parentExecution - the parent execution
      aggregationContext - the aggregation context
      processEngineConfiguration - 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 execution
      parentExecution - the parent execution
      aggregationContext - the aggregation context
      processEngineConfiguration - the process 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 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 done
      targetVarName - 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 execution
      targetVarName - the name of the variable
      processEngineConfiguration - 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<org.flowable.variable.api.persistence.entity.VariableInstance>> groupVariableInstancesByName(List<? extends org.flowable.variable.api.persistence.entity.VariableInstance> instances)
    • resolveVariableAggregator

      public static VariableAggregator resolveVariableAggregator(org.flowable.bpmn.model.VariableAggregationDefinition aggregation, DelegateExecution execution)
    • 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.bpmn.model.VariableAggregationDefinition> groupAggregationsByTarget(DelegateExecution multiInstanceRootExecution, Collection<org.flowable.bpmn.model.VariableAggregationDefinition> aggregations, ProcessEngineConfigurationImpl processEngineConfiguration)
    • getAggregationTargetVarName

      public static String getAggregationTargetVarName(org.flowable.bpmn.model.VariableAggregationDefinition aggregation, DelegateExecution execution, ProcessEngineConfigurationImpl processEngineConfiguration)