Search in sources :

Example 1 with MigratingUserTaskInstance

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

the class UserTaskActivityBehavior method onParseMigratingInstance.

@Override
public void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance) {
    ExecutionEntity execution = migratingInstance.resolveRepresentativeExecution();
    for (TaskEntity task : execution.getTasks()) {
        migratingInstance.addMigratingDependentInstance(new MigratingUserTaskInstance(task, migratingInstance));
        parseContext.consume(task);
        Collection<VariableInstanceEntity> variables = task.getVariablesInternal();
        if (variables != null) {
            for (VariableInstanceEntity variable : variables) {
                // we don't need to represent task variables in the migrating instance structure because
                // they are migrated by the MigratingTaskInstance as well
                parseContext.consume(variable);
            }
        }
    }
}
Also used : TaskEntity(org.camunda.bpm.engine.impl.persistence.entity.TaskEntity) ExecutionEntity(org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity) MigratingUserTaskInstance(org.camunda.bpm.engine.impl.migration.instance.MigratingUserTaskInstance) VariableInstanceEntity(org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity)

Aggregations

MigratingUserTaskInstance (org.camunda.bpm.engine.impl.migration.instance.MigratingUserTaskInstance)1 ExecutionEntity (org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity)1 TaskEntity (org.camunda.bpm.engine.impl.persistence.entity.TaskEntity)1 VariableInstanceEntity (org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity)1