JBoss Community

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

created by stevearoonie in jBPM - View the full discussion

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/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

Steve

Reply to this message by going to Community

Start a new discussion in jBPM at Community