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&...]