Sorting process instances by 'start time'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2011 04:43 AM
I am right that there is no ability to sort process instances by 'start time' in Activiti-API?
If so, can I create JIRA issue for this? Or there is some reason not to implement this?
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2011 09:09 AM
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2011 03:05 PM
Maybe it is not necessary. process instance id's are taken from sequence, so they are always ascending.
So the the result will be the same no matter sort is done based on instance id or start time.
ExecutionQuery.orderByProcessInstanceId already provides ordering capability based on process instance id.
So I think there is no need to add another sort method.
Is it so ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2011 04:36 AM
There's no start time in the ProcessInstance object.
The HistoryService and the HistoricProcessInstance provide the query functionality based on the start time.
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2011 06:20 AM
So do you also agree that it is not necessary to ProcessInstanceQuery.orderByProcessStartTime() and ProcessInstanceQuery.orderByProcessInstanceId is enough and will serve the same purpose ?
If yes, maybe this issue should be set to fixed or will not be done status.
I have posted a little bit more explanation in related jira issue (http://jira.codehaus.org/browse/ACT-1004) to more clarify it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2011 08:29 AM
I agree that start time should not be added to ProcessInstanceQuery but for a different reason.
There's no start time available in the database, so it's not possible to sort on start time.
Instead you can use the HistoricProcessInstanceQuery to sort process instances based on start time.
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2011 04:23 PM
But the question is how much is important to support non default UUID generator. I feel it does not worth the effort.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2011 06:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2015 11:39 AM
We definitely need to be able to sort/paginate on startTime, and I am a bit concerned about using the historical APIs to get information about active processes… this seems wrong
Is there any strong design reason why we can be assured that this is a sustainable approach in the long term? Will a historic entry be created for every process started, at least as soon as it reaches its first asynchronous continuation?
Thanks!
Franck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2015 03:26 AM
Yes, if your history is not disabled.
I agree it's not the best solution and that a start time on the process instance would be good to have for sure.