[jboss-user] [jBPM] - How to get external event to cancel human task and progress process

stevearoonie do-not-reply at jboss.com
Mon Aug 27 00:33:49 EDT 2012

stevearoonie [https://community.jboss.org/people/stevearoonie] created the discussion

"How to get external event to cancel human task and progress process"

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

Hi all,

I my application I have the possibility that whilst a process is sitting at a Human Task node that an external event could make that task no longer necessary, in which case I want my workflow to progress. I have attempted to do this using the following pattern:

 https://community.jboss.org/servlet/JiveServlet/showImage/2-756037-19301/Screen+shot+2012-08-27+at+2.20.27+PM.png  https://community.jboss.org/servlet/JiveServlet/downloadImage/2-756037-19301/450-126/Screen+shot+2012-08-27+at+2.20.27+PM.png 

The gateway is an XOR. When I test this by completing Task 1, the process correctly moves to Task 2. If instead I trigger the event (via ksession.signalEvent("TaskPerformed", null, processInstance.getId());)
 I get the sub-process End node being triggered but Task 1 is still active and Task 2 is not entered.

To test this I am just using a customized version of ProcessTest that is created in a new jBPM Project.

If instead I try processInstance.signalEvent("TaskPerformed", null); I get an NPE in ProcessInstanceImpl (kruntime is null).

Can anybody tell me what I am doing wrong, or possibly another way I can produce the behaviour I desire?

thanks in advance

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120827/b6dede6f/attachment-0001.html 

More information about the jboss-user mailing list