Search in sources :

Example 6 with ExternalTaskEntity

use of org.camunda.bpm.engine.impl.persistence.entity.ExternalTaskEntity in project camunda-bpm-platform by camunda.

the class ExternalTaskCmd method execute.

@Override
public Void execute(CommandContext commandContext) {
    EnsureUtil.ensureNotNull("externalTaskId", externalTaskId);
    validateInput();
    ExternalTaskEntity externalTask = commandContext.getExternalTaskManager().findExternalTaskById(externalTaskId);
    ensureNotNull(NotFoundException.class, "Cannot find external task with id " + externalTaskId, "externalTask", externalTask);
    for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) {
        checker.checkUpdateProcessInstanceById(externalTask.getProcessInstanceId());
    }
    execute(externalTask);
    return null;
}
Also used : ExternalTaskEntity(org.camunda.bpm.engine.impl.persistence.entity.ExternalTaskEntity) CommandChecker(org.camunda.bpm.engine.impl.cfg.CommandChecker)

Aggregations

ExternalTaskEntity (org.camunda.bpm.engine.impl.persistence.entity.ExternalTaskEntity)6 CommandChecker (org.camunda.bpm.engine.impl.cfg.CommandChecker)3 ExecutionEntity (org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity)2 BadUserRequestException (org.camunda.bpm.engine.BadUserRequestException)1 LockedExternalTask (org.camunda.bpm.engine.externaltask.LockedExternalTask)1 LockedExternalTaskImpl (org.camunda.bpm.engine.impl.externaltask.LockedExternalTaskImpl)1 TopicFetchInstruction (org.camunda.bpm.engine.impl.externaltask.TopicFetchInstruction)1 CommandContext (org.camunda.bpm.engine.impl.interceptor.CommandContext)1 MigratingActivityInstance (org.camunda.bpm.engine.impl.migration.instance.MigratingActivityInstance)1 MigratingExternalTaskInstance (org.camunda.bpm.engine.impl.migration.instance.MigratingExternalTaskInstance)1 EventSubscriptionEntity (org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity)1 IncidentEntity (org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity)1 JobDefinitionEntity (org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionEntity)1 JobEntity (org.camunda.bpm.engine.impl.persistence.entity.JobEntity)1 ProcessDefinitionEntity (org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity)1 TaskEntity (org.camunda.bpm.engine.impl.persistence.entity.TaskEntity)1 VariableInstanceEntity (org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity)1 ActivityInstance (org.camunda.bpm.engine.runtime.ActivityInstance)1