Search in sources :

Example 1 with MigratingExternalTaskInstance

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

the class ExternalTaskActivityBehavior method onParseMigratingInstance.

@Override
public void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance) {
    ExecutionEntity execution = migratingInstance.resolveRepresentativeExecution();
    for (ExternalTaskEntity task : execution.getExternalTasks()) {
        MigratingExternalTaskInstance migratingTask = new MigratingExternalTaskInstance(task, migratingInstance);
        migratingInstance.addMigratingDependentInstance(migratingTask);
        parseContext.consume(task);
        parseContext.submit(migratingTask);
    }
}
Also used : ExternalTaskEntity(org.camunda.bpm.engine.impl.persistence.entity.ExternalTaskEntity) ExecutionEntity(org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity) MigratingExternalTaskInstance(org.camunda.bpm.engine.impl.migration.instance.MigratingExternalTaskInstance)

Example 2 with MigratingExternalTaskInstance

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

the class IncidentInstanceHandler method handleExternalTaskIncident.

protected void handleExternalTaskIncident(MigratingInstanceParseContext parseContext, IncidentEntity incident) {
    MigratingExternalTaskInstance owningInstance = parseContext.getMigratingExternalTaskInstanceById(incident.getConfiguration());
    if (owningInstance != null) {
        parseContext.consume(incident);
        MigratingIncident migratingIncident = new MigratingIncident(incident, owningInstance.getTargetScope());
        owningInstance.addMigratingDependentInstance(migratingIncident);
    }
}
Also used : MigratingIncident(org.camunda.bpm.engine.impl.migration.instance.MigratingIncident) MigratingExternalTaskInstance(org.camunda.bpm.engine.impl.migration.instance.MigratingExternalTaskInstance)

Aggregations

MigratingExternalTaskInstance (org.camunda.bpm.engine.impl.migration.instance.MigratingExternalTaskInstance)2 MigratingIncident (org.camunda.bpm.engine.impl.migration.instance.MigratingIncident)1 ExecutionEntity (org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity)1 ExternalTaskEntity (org.camunda.bpm.engine.impl.persistence.entity.ExternalTaskEntity)1