docs: public static LockedExternalTaskImpl fromEntity(ExternalTaskEntity externalTaskEntity, List<String> variablesToFetch, boolean isLocal, boolean deserializeVariables) {
      LockedExternalTaskImpl result = new LockedExternalTaskImpl();
      result.id = externalTaskEntity.getId();
      result.topicName = externalTaskEntity.getTopicName();
      result.workerId = externalTaskEntity.getWorkerId();
      result.lockExpirationTime = externalTaskEntity.getLockExpirationTime();
      result.retries = externalTaskEntity.getRetries();
      result.errorMessage = externalTaskEntity.getErrorMessage();
      result.errorDetails = externalTaskEntity.getErrorDetails();
  
      result.processInstanceId = externalTaskEntity.getProcessInstanceId();
      result.executionId = externalTaskEntity.getExecutionId();
      result.activityId = externalTaskEntity.getActivityId();
      result.activityInstanceId = externalTaskEntity.getActivityInstanceId();
      result.processDefinitionId = externalTaskEntity.getProcessDefinitionId();
      result.processDefinitionKey = externalTaskEntity.getProcessDefinitionKey();
      result.tenantId = externalTaskEntity.getTenantId();
      result.priority = externalTaskEntity.getPriority();
      result.businessKey = externalTaskEntity.getBusinessKey();
  
      ExecutionEntity execution = externalTaskEntity.getExecution();
      result.variables = new VariableMapImpl();
      execution.collectVariables(result.variables, variablesToFetch, isLocal, deserializeVariables);
  
      return result;
    }