Search in sources :

Example 1 with MigratingVariableInstance

use of org.camunda.bpm.engine.impl.migration.instance.MigratingVariableInstance in project camunda-bpm-platform by camunda.

the class VariableInstanceHandler method handle.

@Override
public void handle(MigratingInstanceParseContext parseContext, MigratingProcessElementInstance owningInstance, List<VariableInstanceEntity> variables) {
    ExecutionEntity representativeExecution = owningInstance.resolveRepresentativeExecution();
    for (VariableInstanceEntity variable : variables) {
        parseContext.consume(variable);
        boolean isConcurrentLocalInParentScope = (variable.getExecution() == representativeExecution.getParent() && variable.isConcurrentLocal()) || representativeExecution.isConcurrent();
        owningInstance.addMigratingDependentInstance(new MigratingVariableInstance(variable, isConcurrentLocalInParentScope));
    }
}
Also used : ExecutionEntity(org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity) MigratingVariableInstance(org.camunda.bpm.engine.impl.migration.instance.MigratingVariableInstance) VariableInstanceEntity(org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity)

Example 2 with MigratingVariableInstance

use of org.camunda.bpm.engine.impl.migration.instance.MigratingVariableInstance in project camunda-bpm-platform by camunda.

the class VariableConflictActivityInstanceValidator method getMigratingVariableInstancesByName.

protected Map<String, List<MigratingVariableInstance>> getMigratingVariableInstancesByName(MigratingActivityInstance activityInstance) {
    Map<String, List<MigratingVariableInstance>> result = new HashMap<String, List<MigratingVariableInstance>>();
    for (MigratingInstance migratingInstance : activityInstance.getMigratingDependentInstances()) {
        if (migratingInstance instanceof MigratingVariableInstance) {
            MigratingVariableInstance migratingVariableInstance = (MigratingVariableInstance) migratingInstance;
            CollectionUtil.addToMapOfLists(result, migratingVariableInstance.getVariableName(), migratingVariableInstance);
        }
    }
    return result;
}
Also used : HashMap(java.util.HashMap) MigratingVariableInstance(org.camunda.bpm.engine.impl.migration.instance.MigratingVariableInstance) List(java.util.List) MigratingInstance(org.camunda.bpm.engine.impl.migration.instance.MigratingInstance)

Aggregations

MigratingVariableInstance (org.camunda.bpm.engine.impl.migration.instance.MigratingVariableInstance)2 HashMap (java.util.HashMap)1 List (java.util.List)1 MigratingInstance (org.camunda.bpm.engine.impl.migration.instance.MigratingInstance)1 ExecutionEntity (org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity)1 VariableInstanceEntity (org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity)1