use of org.camunda.bpm.engine.rest.dto.externaltask.FetchExternalTasksExtendedDto in project camunda-bpm-platform by camunda.
the class FetchAndLockHandlerImpl method tryFetchAndLock.
protected FetchAndLockResult tryFetchAndLock(FetchAndLockRequest request) {
ProcessEngine processEngine = request.getProcessEngine();
IdentityService identityService = processEngine.getIdentityService();
FetchAndLockResult result;
try {
identityService.setAuthentication(request.getAuthentication());
FetchExternalTasksExtendedDto fetchingDto = request.getDto();
List<LockedExternalTaskDto> lockedTasks = executeFetchAndLock(fetchingDto, processEngine);
result = FetchAndLockResult.successful(lockedTasks);
} catch (ProcessEngineException e) {
result = FetchAndLockResult.failed(e);
} finally {
identityService.clearAuthentication();
}
return result;
}
use of org.camunda.bpm.engine.rest.dto.externaltask.FetchExternalTasksExtendedDto in project camunda-bpm-platform by camunda.
the class FetchAndLockRequest method getTimeoutTimestamp.
public long getTimeoutTimestamp() {
FetchExternalTasksExtendedDto dto = getDto();
long requestTime = getRequestTime().getTime();
long asyncResponseTimeout = dto.getAsyncResponseTimeout();
return requestTime + asyncResponseTimeout;
}
Aggregations