code: public ProcessInstance getProcessInstance(Long procInstId)
              throws SQLException {
          String query = "select " + PROCINST_QUERY_FIELDS +
              " from PROCESS_INSTANCE where PROCESS_INSTANCE_ID=?";
          ResultSet rs = db.runSelect(query, procInstId);
          if (!rs.next()) throw new SQLException("Failed to load process instance: " + procInstId);
          return this.getProcessInstanceSub(rs);
      }
docs: different from V4: include completion code; add flag to say
  if variable instances are needed