cancel
Showing results for 
Search instead for 
Did you mean: 

Lastest task at the top of task list (sort by descending)

limcheekin
Champ on-the-rise
Champ on-the-rise
Hi,

Is there any way to display latest task as top most record of task list? As all Id. fields such as taskId, executionId and processInstanceId is VARCHAR type in database, TaskQuery.orderByxxxId() is not functioning properly. Please see the attached image, it is order by taskId in descending order, you can see that the result is incorrect.

As all Id. fields are display numeric value, why not using Long instead of String? To ensure it is unique in Clustering/Cloud environment?

Please advice.

Regards,
Chee Kin
8 REPLIES 8

jbarrez
Star Contributor
Star Contributor
That's actually a very interesting thing you discovered there, I hadn't thought about it like that …but it makes definitely sense.

I added a Jira to track this: http://jira.codehaus.org/browse/ACT-207

limcheekin
Champ on-the-rise
Champ on-the-rise
Hi Joram,

Thanks to create the jira to track it.

Regards,
Chee Kin

limcheekin
Champ on-the-rise
Champ on-the-rise
Hi Joram,

That's actually a very interesting thing you discovered there, I hadn't thought about it like that …but it makes definitely sense.

I added a Jira to track this: http://jira.codehaus.org/browse/ACT-207
Will this feature be implemented in next release?

Regards,
Chee Kin

jbarrez
Star Contributor
Star Contributor
Hi Chee,

I understand your need for it, but it will not be implemented since there is not much demand for it (yet).

It's also a pretty costly database operation, database-wise so it should not be a default.
Can't u order by default on the create time? It will give you the same sorting as sorting on id.

limcheekin
Champ on-the-rise
Champ on-the-rise
Hi Chee,

I understand your need for it, but it will not be implemented since there is not much demand for it (yet).

It's also a pretty costly database operation, database-wise so it should not be a default.
Can't u order by default on the create time? It will give you the same sorting as sorting on id.

Hi Joram,

Thanks for writing.

Yes, I can order it by create time. I post the previous message due to the reason that I cannot find orderByCreateTime in TaskQuery Javadoc at http://activiti.org/javadocs/org/activiti/engine/task/TaskQuery.html. Should I create a jira?

Regards,
Chee Kin

jbarrez
Star Contributor
Star Contributor
You are correct, it should be on the TaskQuery API !

You are very welcome to create a Jira.
And also many thanks for all the other jiras you raised this release, they are really helping us getting Activiti top-notch!

limcheekin
Champ on-the-rise
Champ on-the-rise
You are correct, it should be on the TaskQuery API !

You are very welcome to create a Jira.
And also many thanks for all the other jiras you raised this release, they are really helping us getting Activiti top-notch!

Welcome, It is just minor tasks. A jira is created at http://jira.codehaus.org/browse/ACT-321.

Regards,
Chee Kin

jbarrez
Star Contributor
Star Contributor
Thanks. It will be fixed in the next release.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.