cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime Service

varunbhaskar
Champ in-the-making
Champ in-the-making
Hey,

I am working on a project where i use service task to connect with third party libraries to do some statistical calculations. I am currently using spring-activiti jar.
I have the following concerns regarding "RuntimeService", please try to address them.
* I am not able to access the processInstances from the runtimeService, even after using all following apis
> runtimeService.createProcessInstanceQuery().list();
> runtimeService.createProcessInstanceQuery().procesInstanceId(procesInstanceId).list();
> runtimeSerice.createExecutionQuery().list();
all the above expressions are resulting in an empty list.
Please help me on accessing the process instances under execution.
* Once the process execution is transferred to the third party libraries, i am not able to delete the process instance under execution.
* All of this is true with the historyService as well.
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

Did you check the database and can you see the process instances being available there?
The process instance query should always return the running process instances.

Best regards,

varunbhaskar
Champ in-the-making
Champ in-the-making
Thanks for the reply,
I am able to solve the above problems by making my service tasks async. Now i'm able to find my process instances but when i try to delete them using
<java>
deleteProcessInstance(ProcessInstanceId, Reason)
</java>
PROCESS_CANCELLED event will be triggered followed by PROCESS_COMPLETED but the process continues to execute and ill see a PROCESS_COMPLETED event at the end.