use of org.camunda.bpm.engine.externaltask.UpdateExternalTaskRetriesBuilder in project camunda-bpm-platform by camunda.
the class ExternalTaskRestServiceImpl method setRetries.
@Override
public void setRetries(SetRetriesForExternalTasksDto retriesDto) {
UpdateExternalTaskRetriesBuilder builder = updateRetries(retriesDto);
int retries = retriesDto.getRetries();
try {
builder.set(retries);
} catch (NotFoundException e) {
throw new InvalidRequestException(Status.NOT_FOUND, e.getMessage());
} catch (BadUserRequestException e) {
throw new InvalidRequestException(Status.BAD_REQUEST, e.getMessage());
}
}
use of org.camunda.bpm.engine.externaltask.UpdateExternalTaskRetriesBuilder in project camunda-bpm-platform by camunda.
the class ExternalTaskRestServiceImpl method setRetriesAsync.
@Override
public BatchDto setRetriesAsync(SetRetriesForExternalTasksDto retriesDto) {
UpdateExternalTaskRetriesBuilder builder = updateRetries(retriesDto);
int retries = retriesDto.getRetries();
try {
Batch batch = builder.setAsync(retries);
return BatchDto.fromBatch(batch);
} catch (NotFoundException e) {
throw new InvalidRequestException(Status.NOT_FOUND, e.getMessage());
} catch (BadUserRequestException e) {
throw new InvalidRequestException(Status.BAD_REQUEST, e.getMessage());
}
}
Aggregations