Ejemplo n.º 1
0
  private IItemCollection getClosedTasksCTL(
      int taskCtlId, InputStream tasklistxml, String resp, int pcdId) throws ISPACException {

    DbCnt cnt = context.getConnection();
    try {
      WLTaskListFactory wlfactory = new WLTaskListFactory();
      WLTaskListBuilder wlbuilder = null;

      wlbuilder = wlfactory.getClosedTaskListBuilder(tasklistxml);
      if (wlbuilder == null)
        throw new ISPACException(
            "No se ha podido construir WLTaskListBuilder para tramites cerrados");

      CollectionDAO coldao = wlbuilder.getTaskList(cnt, taskCtlId, resp, pcdId);
      return coldao.disconnect();
    } catch (ISPACException ie) {
      throw new ISPACException(
          "Error en WLWorklist:getClosedTasksCTL("
              + taskCtlId
              + ", tasklistxml, pcdId["
              + pcdId
              + "])",
          ie);
    } finally {
      context.releaseConnection(cnt);
    }
  }
Ejemplo n.º 2
0
  /* (non-Javadoc)
   * @see ieci.tdw.ispac.api.IWorklistAPI#getTasksPCD(int, InputStream)
   */
  public IItemCollection getClosedTasksPCD(int taskPcdId, InputStream tasklistxml)
      throws ISPACException {

    String resp = getRespString();
    DbCnt cnt = context.getConnection();
    try {
      WLTaskListFactory wlfactory = new WLTaskListFactory();
      WLTaskListBuilder wlbuilder = null;

      wlbuilder = wlfactory.getClosedTaskListBuilder(tasklistxml);
      if (wlbuilder == null)
        throw new ISPACException(
            "No se ha podido construir WLTaskListBuilder para tramites cerrados");

      CollectionDAO coldao =
          wlbuilder.getTaskList(
              cnt,
              ISPACEntities.ENTITY_NULLREGKEYID,
              resp,
              ISPACEntities.ENTITY_NULLREGKEYID,
              taskPcdId);
      return coldao.disconnect();
    } catch (ISPACException ie) {
      throw new ISPACException(
          "Error en WLWorklist:getClosedTasksPCD(" + taskPcdId + ", tasklistxml)", ie);
    } finally {
      context.releaseConnection(cnt);
    }
  }