How to find out if a service task has been terminated?

1
0
-1

How do I find out if a service task has been terminated? Is it possible to figure this out through groovy script?

2 answers

1
0
-1

Yes,

have a look at

CANCELLED_STATE - Static variable in class org.bonitasoft.engine.bpm.flownode.ActivityStates

in API documentation, it will lead you to what you want

regards
Seán

PS: As this reply answers your question, please mark as resolved.

1
0
-1

Hi,

You can use the searchArchivedActivities method from processApi. You can do that in a Groovy script. Here is an example where I retrieve all the archived activity instances that called "Step1".

  1. SearchOptionsBuilder searchOptionsBuilder = new SearchOptionsBuilder(0, 100);
  2. searchOptionsBuilder.filter(ArchivedActivityInstanceSearchDescriptor.NAME, "Step1");
  3. SearchOptions searchOptions = searchOptionsBuilder.done();
  4.  
  5. SearchResult<ArchivedActivityInstance> archivedActivityInstances = processApi.searchArchivedActivities(searchOptions);
  6.  
  7. for (ArchivedActivityInstance archivedAI : archivedActivityInstances.getResult()) {
  8. // Do something
  9. }
Notifications