Bug 1190688

Summary: Intermediate Link events paired N to 1
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jozef Marko <jomarko>
Component: jBPM CoreAssignee: Alessandro Lazarotti <alazarot>
Status: CLOSED EOL QA Contact: Jozef Marko <jomarko>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.0CC: jie.lin, kverlaen, mbaluch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:05:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
project with bpmn processes
none
repaired attachment none

Description Jozef Marko 2015-02-09 13:02:51 UTC
Created attachment 989674 [details]
project with bpmn processes

*** Description of problem:
In bpmn process can be declared Intermediate Link Events. They serve as 'go to' pattern. 
Intermediate Throw Link Event == from
Intermediate Catch Link Event == to

By specification, it is possible to have defined two Throw Link Events both targeting to the same Catch Link Event.

The problem is, I can't run such process. In the attachment 'BPMN2LinkEventNotOk.bpmn2' represents such process.

*** Version-Release number of selected component (if applicable):
6.2.0.CR4

*** How reproducible:
1.) Open the attached project and run class JbpmTest as JUnit test.
2.) This exception will be thrown "java.lang.IllegalArgumentException: There should be at least 2 link events to make a connection"
3.) Change this string 'BPMN2LinkEventNotOk' to 'BPMN2LinkEventOk' in both test methods
4.) Again run class as JUnit test. Both test methods will pass.


*** Expected results:
Tests methods should pass for both variants. It means 'BPMN2LinkEventNotOk' and 'BPMN2LinkEventOk'

Comment 1 Jozef Marko 2015-02-09 13:06:51 UTC
Created attachment 989675 [details]
repaired attachment

Please, use this attachment for bug reproduction.

Comment 2 Jozef Marko 2015-02-09 13:14:17 UTC
Comment on attachment 989675 [details]
repaired attachment

Sorry, my bad. First attachment is the right.

Comment 4 jl987 2015-04-30 15:19:51 UTC
When I tried to run the unit test with String "BPMN2LinkEventOk", the test is still throwing the following error:

java.lang.IllegalArgumentException: There should be at least 2 link events to make a connection
	at org.jbpm.bpmn2.xml.ProcessHandler.linkIntermediateLinks(ProcessHandler.java:222)
	at org.jbpm.bpmn2.xml.ProcessHandler.end(ProcessHandler.java:180)
	at org.drools.core.xml.ExtensibleXmlParser.endElement(ExtensibleXmlParser.java:439)
...

Can you elaborate on how you are making the case where the string "BPMN2LinkEventOk" work?

Thanks!

Comment 5 Jozef Marko 2015-05-04 06:43:14 UTC
Sorry, I forgot to mention it. It is enough to move temporarily 'src/main/resorces/com/redhat/jomarko/BPMN2-LinkEventNotOK.bpmn2' for example into 'src/main/java/com/redhat/jomarko/BPMN2-LinkEventNotOK.bpmn2' if you want to run BPMN2LinkEventOk process.