cancel
Showing results for 
Search instead for 
Did you mean: 

[Urgent]All completed task dashlet (specify workflow)

leyer
Champ in-the-making
Champ in-the-making
Hello everyone,
I try to create a dashlet with the jbpm diagramme.
But i have a probleme, i need all completed task but with the javascript workflow api i have only the active task.
How can i do to all tasks ?


        var list = new Array();
   var name= url.templateArgs.name;
   var selectedworkflow;
   var tasks = new Array();
   var works = workflow.getDefinitionByName("jbpm$workflowname").getActiveInstances();
  
   for each(single in works)
   {
      if(single.description == name){
         selectedworkflow = single.getPaths();
         for each(path in selectedworkflow){
            tasks=path.getTasks();
               for each(task in tasks){
                  list.push(task);
               }
         }
      }
   }
   model.tasklist = list;
   model.work = works;
   model.name = name;
5 REPLIES 5

pqr
Champ in-the-making
Champ in-the-making
Hi,

You can use getCompletedTasks()

Refer following link
http://wiki.alfresco.com/wiki/Workflow_JavaScript_API

leyer
Champ in-the-making
Champ in-the-making
Hi,
Getcompletedtask don't work in my case.

"Returns all tasks that are assigned to the current user and that are completed. "

I need all completed tasks for a specify workflow. And not just user task.  :cry:

inocka
Champ in-the-making
Champ in-the-making
Hi leyer,
Did you solve your problem?
If yes please share
Thanks in advance

krups
Champ in-the-making
Champ in-the-making
Hi,

I am just wondering did you find any solution?
I am also looking for same.
Please help me.

Thanks

lucille_arkenst
Champ in-the-making
Champ in-the-making
I agree.  I've been working on this for days.  It shouldn't be this hard.  I shouldn't have to write Java code.  It should be as easy as writing a web script.  I don't care about "security".  I want to see ALL completed tasks.  My people want to see ALL completed tasks.  And nobody should have to reinvent the wheel if someone has already worked this out.
I beseech anybody who has actual working code to post it.  I see this same question asked over and over.  Just post the code, please.