docs: protected void ensureExecutionTreeInitialized() {
      List<ExecutionEntity> executions = Context.getCommandContext()
        .getExecutionManager()
        .findExecutionsByProcessInstanceId(processInstanceId);
  
      ExecutionEntity processInstance = isProcessInstanceExecution() ? this : null;
  
      if(processInstance == null) {
        for (ExecutionEntity execution : executions) {
          if (execution.isProcessInstanceExecution()) {
            processInstance = execution;
          }
        }
      }
  
      processInstance.restoreProcessInstance(executions, null, null, null, null, null, null);
    }