Retrieving finished, done, completed (or whatever) tasks


Hello there...

As far as i know and read and "Googled", this question isn't resolved yet (in fact, im sorry for resurrect this)... Im looking for all the tasks that i marked as FINISHED on my process

Here's a little briefing

I'm trying to control a whole process using BOS6.3 REST API using a RESTful architecture I send a PUT request on the method API/bpm/case to set the task as FINISHED (this works awesome btw) I can actually run the workflow using the API REST really nicely... in fact, i can finish the whole process smoothly

Now, i want to show the user the trace of every humanTask which the process as passed (mostly like the "done tasks" on BOS UserXP) in the runtime

I know the method archivedHumanTask works only on cases that actually been completed, so this one doesnt help me ATM(as far as i know) I can't retrieve any other tasks than "the ready one" using any of these methods: task, activity, humanTask, userTask (using the compound or the filter method)

Now the same question that made 9months ago: is there any method in BOS6.X Community that i can use in order to retrieve the finished tasks

Well, thats all for now, sorry about my english. Greetings from Venezuela!


Submitted by drakezilla on Thu, 07/31/2014 - 21:39
2 answers

This one is the BEST answer!

archivedHumanTask should also give you archived human task for an ongoing case. You can try something like following:

  1. http://yourserver:port/bonita/API/bpm/archivedHumanTask?p=0&c=5&o=archivedDate%20DESC&f=caseId%3d1&f=user_id%3d4

where you retrieve a list of first 5 archived human tasks for the case id 1 and user id 4, sorted in descending order by archivedDate Hope this helps, Haris


Submitted by drakezilla on Thu, 07/31/2014 - 21:40

Man, works like a charm!!! this is exactly the thing i was looking for

Thanks a lot for this one, consider this question solved!! :D



I had to make an history for one of my project. I used archivedActivityInstance(Long processusInstanceId, int startIndex, int maxResults, ActivityInstanceCriterion) to get the list of tasks done.

If you don't want to show System task, just check if the activityInstance has been executed by the id 0, which is this system user id.

Hope this solve your problem :)

EDIT : Ooops, I didn't see you're using WEB REST API. There's simple and multiple method for this resource.

Maybe you're using simple method that's why you're getting only one task ?