cancel
Showing results for 
Search instead for 
Did you mean: 

How can i stop default task in activiti?

vamsinipun
Star Contributor
Star Contributor

Hi,

    How can i stop the default task in my activiti project? Everytime background running this 

C3P0PooledConnectionPoolManager[identityToken->1hge3vv9r1r36ejc15ykklt|4015b06b]-AdminTaskTimer

and some debug statements are printing. how can i stop those?

1 ACCEPTED ANSWER

fegor
Star Collaborator
Star Collaborator

Hi!

You do cancel process instance with deleteProcessInstance(String processId, String reason). For example:

RuntimeService runtimeService = activitiRule.getRuntimeService();
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("my-process");

...
runtimeService.deleteProcessInstance(processInstance.getId(), "Cancel forced!");

Regards!

View answer in original post

3 REPLIES 3

fegor
Star Collaborator
Star Collaborator

From /activiti-admin you can stop instances of tasks and process.

vamsinipun
Star Contributor
Star Contributor

Thank you for your reply. I am using activiti 5 in my spring web application. Here I didn't run activiti-admin. Now, how can i stop the default process?

fegor
Star Collaborator
Star Collaborator

Hi!

You do cancel process instance with deleteProcessInstance(String processId, String reason). For example:

RuntimeService runtimeService = activitiRule.getRuntimeService();
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("my-process");

...
runtimeService.deleteProcessInstance(processInstance.getId(), "Cancel forced!");

Regards!

Getting started

Explore our Alfresco products with the links below. Use labels to filter content by product module.