Search in sources :

Example 1 with MigratingIncident

use of org.camunda.bpm.engine.impl.migration.instance.MigratingIncident 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)

Example 2 with MigratingIncident

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

the class IncidentInstanceHandler method handleFailedJobIncident.

protected void handleFailedJobIncident(MigratingInstanceParseContext parseContext, IncidentEntity incident) {
    MigratingJobInstance owningInstance = parseContext.getMigratingJobInstanceById(incident.getConfiguration());
    if (owningInstance != null) {
        parseContext.consume(incident);
        if (owningInstance.migrates()) {
            MigratingIncident migratingIncident = new MigratingIncident(incident, owningInstance.getTargetScope());
            JobDefinitionEntity targetJobDefinitionEntity = owningInstance.getTargetJobDefinitionEntity();
            if (targetJobDefinitionEntity != null) {
                migratingIncident.setTargetJobDefinitionId(targetJobDefinitionEntity.getId());
            }
            owningInstance.addMigratingDependentInstance(migratingIncident);
        }
    }
}
Also used : JobDefinitionEntity(org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionEntity) MigratingIncident(org.camunda.bpm.engine.impl.migration.instance.MigratingIncident) MigratingJobInstance(org.camunda.bpm.engine.impl.migration.instance.MigratingJobInstance)

Example 3 with MigratingIncident

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

the class IncidentInstanceHandler method handleIncident.

protected void handleIncident(MigratingInstanceParseContext parseContext, IncidentEntity incident) {
    MigratingActivityInstance owningInstance = parseContext.getMigratingActivityInstanceById(incident.getExecution().getActivityInstanceId());
    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) MigratingActivityInstance(org.camunda.bpm.engine.impl.migration.instance.MigratingActivityInstance)

Aggregations

MigratingIncident (org.camunda.bpm.engine.impl.migration.instance.MigratingIncident)3 MigratingActivityInstance (org.camunda.bpm.engine.impl.migration.instance.MigratingActivityInstance)1 MigratingExternalTaskInstance (org.camunda.bpm.engine.impl.migration.instance.MigratingExternalTaskInstance)1 MigratingJobInstance (org.camunda.bpm.engine.impl.migration.instance.MigratingJobInstance)1 JobDefinitionEntity (org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionEntity)1