Ejemplo n.º 1
0
  public IProcess getProcess(String numExp) throws ISPACException {
    DbCnt cnt = null;
    try {
      cnt = mcontext.getConnection();
      IItemCollection itemcol = TXProcesoDAO.getProcess(cnt, numExp, mcontext);
      if (!itemcol.next())
        //				throw new ISPACNullObject(
        //						"No se ha encontrado el proceso con número de expediente ["
        //								+ numExp + "]");

        throw new ISPACNullObject("exception.expedients.unknown", new Object[] {numExp});

      return (IProcess) itemcol.value();
    } catch (ISPACException e) {
      if (e instanceof ISPACNullObject) {
        throw new ISPACInfo(e.getMessage(), e.getArgs(), false);
      }
      throw new ISPACException("Error en InvesflowAPI:getProcess(" + numExp + ")", e);
    } finally {
      mcontext.releaseConnection(cnt);
    }
  }