Discussion:
[jboss-user] [jBPM] - Service Task + Error Boundary Event ?
wishmaster7
2013-03-04 08:10:52 UTC
Permalink
wishmaster7 [https://community.jboss.org/people/wishmaster7] created the discussion

"Service Task + Error Boundary Event ?"

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

--------------------------------------------------------------
Hi all,

I am using a Service Task which calls a Java method, and I'd like to know how to handle exceptions in the jBPM process. I've tried to design it with a Boundary Event (see attached screenshot) but I'm not sure if it works and how I can trigger it from my Java method.

Can someone please help me?

Loading Image... Loading Image...
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
wishmaster7
2013-03-12 10:59:50 UTC
Permalink
wishmaster7 [https://community.jboss.org/people/wishmaster7] created the discussion

"Re: Service Task + Error Boundary Event ?"

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

--------------------------------------------------------------
String serviceTaskId = "ServiceTask_1";
String errorCode = "Error";
ksession.signalEvent("Error-"+serviceTaskId+"-"+errorCode, "", processInstance.getId());
BUT...

if I am in a sub-process, the "Fail" node is triggered, but the sub-process is not completed => we don't reach the next node in the parent process.

the boundary event has an attribute:  cancelActivity="true" . but it seems the process is still waiting for something to happen in the sub-process. and I haven't been able to manually abort the service task (not even sure if it's the solution).

I've also tried with a "Terminate Definition" on the "Fail" node, it doesn't solve the problem.


does someone has an idea of what I should do ?
--------------------------------------------------------------

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

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