Updated Open Lock TR
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@111493 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2032afb8bb
commit
e0ce6d552a
|
@ -340,10 +340,23 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
for(TabularResource tr:pendingTR){
|
for(TabularResource tr:pendingTR){
|
||||||
logger.debug("Pending Task:"+ tr.getId());
|
logger.debug("Pending Task:"+ tr.getId());
|
||||||
List<Task> tasks=service.getTasks(tr.getId(), TaskStatus.IN_PROGRESS);
|
List<Task> tasksInitializing=service.getTasks(tr.getId(), TaskStatus.INITIALIZING);
|
||||||
|
List<Task> tasksInProgress=service.getTasks(tr.getId(), TaskStatus.IN_PROGRESS);
|
||||||
|
List<Task> tasksValidatingRules=service.getTasks(tr.getId(), TaskStatus.VALIDATING_RULES);
|
||||||
|
HashMap<String,Task> tasks=new HashMap<String,Task>();
|
||||||
|
for(Task t:tasksInitializing){
|
||||||
|
tasks.put(t.getId().getValue(),t);
|
||||||
|
}
|
||||||
|
for(Task t:tasksInProgress){
|
||||||
|
tasks.put(t.getId().getValue(),t);
|
||||||
|
}
|
||||||
|
for(Task t:tasksValidatingRules){
|
||||||
|
tasks.put(t.getId().getValue(),t);
|
||||||
|
}
|
||||||
|
|
||||||
TRId trId=new TRId(String.valueOf(tr.getId().getValue()));
|
TRId trId=new TRId(String.valueOf(tr.getId().getValue()));
|
||||||
for(Task task:tasks){
|
for(String key:tasks.keySet()){
|
||||||
TaskWrapper taskWrapper=new TaskWrapper(task,UIOperationsId.GenericPendingOperation, trId);
|
TaskWrapper taskWrapper=new TaskWrapper(tasks.get(key),UIOperationsId.Pending, trId);
|
||||||
SessionUtil.setTaskInBackground(session, taskWrapper);
|
SessionUtil.setTaskInBackground(session, taskWrapper);
|
||||||
pendingNumber++;
|
pendingNumber++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue