code: public List<TaskInstance> getSubtaskInstances(Long masterTaskInstId) throws DataAccessException {
          try {
              db.openConnection();
              String query = "select " + getTaskInstanceSelect() +
                      " from TASK_INSTANCE ti where TASK_INST_SECONDARY_OWNER = ? and TASK_INST_SECONDARY_OWNER_ID = ?";
              Object[] args = new Object[2];
              args[0] = OwnerType.TASK_INSTANCE;
              args[1] = masterTaskInstId;
              ResultSet rs = db.runSelect(query, args);
              List<TaskInstance> taskInsts = new ArrayList<TaskInstance>();
              while (rs.next()) {
                  taskInsts.add(getTaskInstanceSub(rs, false));
              }
              return taskInsts;
          } catch (Exception e) {
              throw new DataAccessException(0, "failed to get task instances", e);
          } finally {
              db.closeConnection();
          }
      }
docs: Returns shallow TaskInstances.