Bug 1165698 - ProcessEventListener does not work well with Signal Start Event
Summary: ProcessEventListener does not work well with Signal Start Event
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Maciej Swiderski
QA Contact: Jiri Svitak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-19 14:02 UTC by Tomas Livora
Modified: 2015-06-02 01:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-19 16:35:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomas Livora 2014-11-19 14:02:29 UTC
Description of problem:
When you create a process with Signal Start Event, beforeProcessStarted and afterProcessStarted are called twice.

Version-Release number of selected component (if applicable):
6.1.0 ER2

Steps to Reproduce:
1. Create a simple process which contains only Signal Start Event and End Event.
2. Create your own ProcessEventListener and add it to the KieSession.
3. Start the process and see generated events.
4. Send a signal and see another events.

Actual results:
Both beforeProcessStarted and afterProcessStarted methods are called twice. Once when you call ksession.startProcess and then again when you send a signal and process is really started.

Expected results:
I think the correct behavior will be if both beforeProcessStarted and afterProcessStarted are called just once. After you call ksession.startProcess, beforeProcessStarted should be called. And after the signal is sent, afterProcessStarted should be called.

Additional info:
http://git.app.eng.bos.redhat.com/git/jbossqe/brms.git/tree/test-jbpm-regression/src/test/java/com/bpms/functional/ProcessEventListenerTest.java
http://git.app.eng.bos.redhat.com/git/jbossqe/brms.git/tree/test-jbpm-regression/src/test/resources/SignalStartEvent.bpmn2

Comment 1 Maciej Swiderski 2014-11-19 16:12:46 UTC
Tomas,

for signal start event there is no need to call start process because it should be started by signal and not manually. In your case it actually starts two process instances you can see that when you print out process instance id from within listener.

Comment 2 Tomas Livora 2014-11-19 16:35:54 UTC
Oh, I have not realized that I run two process instances. Thanks for the explanation, it makes sense now. I am closing this BZ as it is not a bug.


Note You need to log in before you can comment on or make changes to this bug.