count running activities

1
0
-1

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

4 answers

1
+1
-1

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

Comments

Submitted by broblin on Mon, 03/17/2014 - 10:10

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 ?

1
0
-1

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 ?

1
0
-1

Thank for the response

The version is :

Bonita 5.10.1

1
0
-1

Hello broblin

What version we are talking here?

Regards

Notifications