Process instance query problem
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2014 09:55 AM
Hello,
I think I'm having an issue with the runtime service and a process instance query:
the query code is :
…
return runtimeService.createProcessInstanceQuery().processDefinitionId(processDefinition.getId())
.orderByProcessInstanceId().asc().list();
}
…
-processDefinition.getId() is defined and exists in the database.
-a matching process instance exists in the database and the runtime service should return a list with this process instance but it returns an empty list…
Thanks for your answer.
Best regards,
Michaël Nepyjwoda
PS: I can provide screenshots of the code and the database if it helps you but you will have to tell me how to post them.
I think I'm having an issue with the runtime service and a process instance query:
the query code is :
…
return runtimeService.createProcessInstanceQuery().processDefinitionId(processDefinition.getId())
.orderByProcessInstanceId().asc().list();
}
…
-processDefinition.getId() is defined and exists in the database.
-a matching process instance exists in the database and the runtime service should return a list with this process instance but it returns an empty list…
Thanks for your answer.
Best regards,
Michaël Nepyjwoda
PS: I can provide screenshots of the code and the database if it helps you but you will have to tell me how to post them.
Labels:
- Labels:
-
Archive
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 03:35 AM
Hi Michaël,
Try to debug your code and
on the line
Check whether key is not misused as Id.
Regards
Martin
Try to debug your code and
on the line
return runtimeService.createProcessInstanceQuery().processDefinitionId(processDefinition.getId())
.orderByProcessInstanceId().asc().list();
try to execute runtimeService.createProcessInstanceQuery().list()
- you will see all process instances in the engine.Check whether key is not misused as Id.
Regards
Martin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2014 10:19 AM
Hello Martin,
I've just tried what you suggested but the runtime service returns an empty list while some process instances are defined in the ACT_HI_PROCINST table…
Some other idea ?
I've just tried what you suggested but the runtime service returns an empty list while some process instances are defined in the ACT_HI_PROCINST table…
Some other idea ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2014 04:57 AM
- The runtime service will NOT return process instances from ACT_HI_PROCINST, but from ACT_RU_EXECUTION.
- Does runtimeService.createProcessInstanceQuery().list() give you anything?
- Does runtimeService.createProcessInstanceQuery().list() give you anything?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2014 06:34 AM
Hi Joram,
runtimeService.createProcessInstanceQuery().list() returns an empty list and ACT_RU_EXECUTION is empty.
runtimeService.createProcessInstanceQuery().list() returns an empty list and ACT_RU_EXECUTION is empty.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2014 06:55 AM
Joram,
I found what was wrong: the runtime service only returns active process instances and mine were finished.
So there is no more problem.
Have I something to do to close this post ?
Thanks.
I found what was wrong: the runtime service only returns active process instances and mine were finished.
So there is no more problem.
Have I something to do to close this post ?
Thanks.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2014 10:24 AM
Ok, good to hear. No need to close post, replying it's working is enough 🙂
