[jboss-user] [jBPM] - how to stop business process in case of exception

diomede illuzzi do-not-reply at jboss.com
Wed Jun 26 10:54:57 EDT 2013


diomede illuzzi [https://community.jboss.org/people/medello] created the discussion

"how to stop business process in case of exception"

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

--------------------------------------------------------------
I setup a business process which includes a custom workItem; I want the business process to sop when a particular condition occurs, so in this case I call the abortWorkItem method, whose implementation is very simple (ksession is an instance variable set while registering the wotkitem

public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
        ksession.abortProcessInstance(workItem.getProcessInstanceId());
            }

Everything works fine if I start the process from a standalone client, but when I start it from the jbpm console, I have no way to set there the ksession, so an exception is raised; so my question is: how to stop the processInstance when it was started through the console?
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130626/0f5869b2/attachment.html 


More information about the jboss-user mailing list