Hi
I need to get the total number of runnig activites. I try this code but it doesn't seem to work :
SearchQueryBuilder searchBuilder = new SearchQueryBuilder(new ActivityInstanceIndex())
searchBuilder.criterion(ActivityInstanceIndex.STATE).equalsTo(ActivityState.EXECUTING.name())
//TODO : vraiment récupérer les activités en attente de traitement.
return queryRuntimeAPI.search(searchBuilder)
Any idea ?
Benoit
Hello broblin
What version we are talking here?
Regards
Hi
If your goal is to get the number of human task waiting for end user interaction, try replacing ActivityState.EXECUTING with ActivityState.READY. Let me give a brief explanation:
-
ABORTED: the task is aborted due a technical issue
-
CANCELLED: the task has been cancelled by administrator
-
EXECUTING: the task is involved in active transactions (connector or operation)
-
FAILED: the task is failed
-
FINISHED: the task is executed and ended without problem
-
READY: the task has already executed the connectors assigned to "enter" trigger and has done other operations and is waiting for end user interaction
-
SKIPPED: the task has been skipped by administrator
-
SUSPENDED: the task has been suspended by end user.
Let me know if it solve your problem
Ciao
Domenico
Hi Domenico
No I really need to get the task involved in active transaction. therefore I don't understand, why my code doesn't work. Perhaps I forgot something ?