Geoff Pole [http://community.jboss.org/people/instanceof] created the discussion

"StatefulKnowledgeSession signalEvent method"

To view the discussion, visit: http://community.jboss.org/message/627040#627040

--------------------------------------------------------------
Hi,

Can anyone help me to understand why the signalEvent method on the 
StatefulKnowledgeSession calls the ProcessInstancesWaitingForEvent query even 
when I provide the processInstanceId parameter?

The ProcessInstancesWaitingForEvent seems to retrieve all workflow instances 
that are awaititing a particular event.

I am seeing this behaviour in the context of this workflow:

 
http://community.jboss.org/servlet/JiveServlet/showImage/2-627040-16993/data-v.0.0.2.jpg
  
http://community.jboss.org/servlet/JiveServlet/downloadImage/2-627040-16993/450-205/data-v.0.0.2.jpg
 
When I start the workflow with process variables that make it take the lower 
path the workflow begins and waits for the first signal.


| 
 | 
 | ProcessInstance process = 
session.startProcess("com.bluecycle.zephyr.workflow.data-v0.0.2", 
processVariables); |

At this point I am able to signal the first event and the 
ProcessInstancesWaitingForEvent is NOT called. The workflow quickly moves and 
waits for the second signal.

| 
 | 
 | session.signalEvent("Signal1", null, process.getId()); | 
 |

At this point I can signal the second event which does succeed but this time it 
appeas to be calling the ProcessInstancesWaitingForEvent query to find all 
workflows waiting for the signal2 event..

| 
 | 
 | session.signalEvent("Signal2", null, process.getId()); | 
 |

The time that this takes is directly proportional to the number of workflow 
instances that I have waiting for the signal2 event.

Can anyone help me to understand why ProcessInstancesWaitingForEvent is being 
called? It seems like this is unnessercary given that I am providing the 
processInsnanceId. Also I'm not sure why this happens when I signal event 2, 
but not when I signal event 1.

The jbpm versions I have used are the ones bundled in the jbpm 5.10-Final 
installer download.

Thanks very much,

Geoff
--------------------------------------------------------------

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

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

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to