Exemplo n.º 1
0
 @Override
 public void deleteAllPooledTasks(Context context, XmlWorkflowItem wi)
     throws SQLException, AuthorizeException {
   Iterator<PoolTask> allPooledTasks = poolTaskService.find(context, wi).iterator();
   while (allPooledTasks.hasNext()) {
     PoolTask poolTask = allPooledTasks.next();
     allPooledTasks.remove();
     deletePooledTask(context, wi, poolTask);
   }
 }
Exemplo n.º 2
0
  /**
   * Deletes all tasks from this workflowflowitem
   *
   * @param context the dspace context
   * @param wi the workflow item for which we are to delete the tasks
   * @throws SQLException An exception that provides information on a database access error or other
   *     errors.
   * @throws AuthorizeException Exception indicating the current user of the context does not have
   *     permission to perform a particular action.
   */
  @Override
  public void deleteAllTasks(Context context, XmlWorkflowItem wi)
      throws SQLException, AuthorizeException {
    deleteAllPooledTasks(context, wi);

    Iterator<ClaimedTask> allClaimedTasks =
        claimedTaskService.findByWorkflowItem(context, wi).iterator();
    while (allClaimedTasks.hasNext()) {
      ClaimedTask task = allClaimedTasks.next();
      allClaimedTasks.remove();
      deleteClaimedTask(context, wi, task);
    }
  }