Discussion:
[jboss-user] [jBPM] - Abort/Delete process instance
roxy1987
2013-01-18 20:00:25 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Abort/Delete process instance"

To view the discussion, visit: https://community.jboss.org/message/792850#792850

--------------------------------------------------------------
Hi,

I am looking to add following functionality to my application but cant get it working.

a) Stop Process Instance: To abort an active process instance which would mean tasks disappearing from user task lists but the history of the process stays.
b) Delete Process Instance: To delete a process instance(active or inactive) which would mean tasks go away along with any trace of the process in the db.

Can anyone help me with this please.

Thanks
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/792850#792850]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Thomas Setiabudi
2013-01-21 13:14:28 UTC
Permalink
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"Re: Abort/Delete process instance"

To view the discussion, visit: https://community.jboss.org/message/793233#793233

--------------------------------------------------------------
Hi Roxy1987,

Can you make use of JBPM Console's REST Service for this?

from the REST list of jbpm-console-server at /gwt-console-server/rs/server/resources/jbpm

they provides
/gwt-console-server/rs/process/instance/{id}/delete
and
/gwt-console-server/rs/process/instance/{id}/end/{result}

haven't used them personally, but the jbpm-console that comes with the installer have a delete feature that use one of that REST service

Regards,
Thomas Setiabudi

--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793233#793233]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-01-21 13:53:30 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Abort/Delete process instance"

To view the discussion, visit: https://community.jboss.org/message/793247#793247

--------------------------------------------------------------
Hi Thomas,

Thanks for the answer. Though I cant use REST. any other way to treat this that you might know of? there is a method called abortProcessINstance. but calling it is not terminating the prcoess.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/793247#793247]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-01-24 18:15:22 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Abort/Delete process instance"

To view the discussion, visit: https://community.jboss.org/message/794142#794142

--------------------------------------------------------------
ANything regarding this please guys.. Ve been struggling from a long time..
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794142#794142]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-01-24 18:45:48 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Abort/Delete process instance"

To view the discussion, visit: https://community.jboss.org/message/794156#794156

--------------------------------------------------------------
abortProcessInstance on ksession is the way to go, which will abort the process and remove it from runtime engine data base tables. If it does not work, make sure that session that you use is persistent session so it is capable of finding the right process instance. But it will not remove the history log. An option for this is that you could create dedicated session that will be used for deleting process instances and register a custom process event listener on it that will remove data from log db in afterProcessCompleted method.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794156#794156]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-01-24 19:42:21 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Abort/Delete process instance"

To view the discussion, visit: https://community.jboss.org/message/794161#794161

--------------------------------------------------------------
Hi Maciej,

Thanks for the reply. I have used abortProcessINstance, it just runs without any exceptions but doesnt rilly stop the process. WHat do you mean by a persistent session? How do I maintain that.?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/794161#794161]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...