Bug 1265413 - Multi Instance subprocess not valid when validated
Summary: Multi Instance subprocess not valid when validated
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Eclipse Tooling
Version: 6.1.0
Hardware: x86_64
OS: Windows
Target Milestone: ---
: ---
Assignee: Kris Verlaenen
QA Contact: Jozef Marko
Depends On:
TreeView+ depends on / blocked
Reported: 2015-09-22 20:50 UTC by cshumake
Modified: 2020-03-27 19:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2020-03-27 19:46:51 UTC
Type: Bug

Attachments (Terms of Use)
Validation Stack Trace (3.25 KB, text/plain)
2015-09-22 20:50 UTC, cshumake
no flags Details
multiple instance subprocess (18.69 KB, application/zip)
2015-10-26 09:15 UTC, Jozef Marko
no flags Details

Description cshumake 2015-09-22 20:50:26 UTC
Created attachment 1076028 [details]
Validation Stack Trace

Description of problem:

Creating a multi-instance subprocess in the Eclipse plugin yields a bpmn2 file which fails validation once loaded in jBPM. Once a JbpmJunitBaseTestCase which adds this file runs, the attached stack trace is displayed. It highlights that the "collectionExpression" is not specified. From the code it looks like it's looking for a sourceRef in the dataInputAssociation block which is generated in the old Eclipse tool and in the business central editor but not the latest Eclipse tool.

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

JBoss Business Process and Rules Development (BPEL, BPMN2, jBPM, Drools, Guvnor)

JBoss Data Virtualization Development (ModeShape, Teiid Designer)

JBoss Developer Studio (Core Features)               8.1.0.GA-v20150327-1349-B467

JBoss Fuse Development (Fuse tooling related to Camel route development)


BPMN2 Metamodel        1.1.0.Final

BPMN2 Modeler - Diagram Editor            1.1.3.Final

BPMN2 Modeler - jBPM Runtime Extension Feature       1.1.3.Final

Eclipse Git Team Provider  

Eclipse Help System       2.0.103.v20150204-1700

Eclipse Java Development Tools               3.10.1.v20150204-1700

Java implementation of Git

JBoss BPEL Editor             1.3.100.Final-v20141204-2031-B13

JBoss Central     1.3.3.Final-v20150325-0325-B120

JBoss Drools Core            6.2.0.Final

JBoss Drools Guvnor       6.2.0.Final

JBoss jBPM Core               6.2.0.Final

JBoss Runtime Drools Detector 6.2.0.Final

JBoss Runtime jBPM Detector    4.5.200.Final-v20130815-1941-B2008

How reproducible:


Steps to Reproduce:
1. Latest Eclipse
2. Install Integration Stack plugin from Eclipse Marketplace
3. Create a simple maven project
4. Create a new BPMN2 diagram
5. Open the BPMN2 diagram with the currently supported plugin
6. Add a process variable that is a Collection type
7. Create a multi-instance subprocess 
8. Set the Input Data Collection as the process variable created in step 6
9. Set the Input Instance Parameter to any string
10. Complete the subprocess with a simple diagram (start, script "hello", end)
11. Complete the process, save
12. Create a unit test with JbpmJunitBaseTestCase
13. Add the BPMN2 resource to the knowledge base in the test case
14. Try to run the process

Actual results:
Process passes validation and runs

Expected results:
Received exception from attachment

Additional info:
The supported Eclipse editor provides entry/exit script textboxes but no "collection expression" text box and does not generate the XML sections associated with that element.

Comment 2 Jozef Marko 2015-09-23 08:13:06 UTC
Probably the same problem as mentioned here:

Comment 3 Robert (Bob) Brodt 2015-10-20 11:04:41 UTC
It looks like the jBPM execution language grammar does not conform to the BPMN 2.0 standard. From the BPMN 2.0 specification, on page 211:

"Certain Activities and CallableElements contain a InputOutputSpecification element to describe their data requirements. Execution semantics are defined for the InputOutputSpecification and they apply the same way to all elements that extend it. Not every Activity type defines inputs and outputs, only Tasks, CallableElements (Global Tasks and Processes) MAY define their data requirements. Embedded SubProcesses MUST NOT define Data Inputs and Data Outputs directly, however they MAY define them indirectly via MultiInstanceLoopCharacteristics."

Clearly, a SubProcess may not define an ioSpecification element, but it looks like jBPM requires this. Here are the relevant bits of a BPMN2 code sample for SubProcess generated by the Web Designer:

<bpmn2:subProcess id="_5F362DDC-075F-4883-83DB-39BDD08F56A9">
	<bpmn2:ioSpecification id="_SeT7MXcVEeWEUNdIqX8sPw">
		<bpmn2:dataInput id="_5F362DDC-075F-4883-83DB-39BDD08F56A9_input" name="inputList" />
		<bpmn2:dataOutput id="_5F362DDC-075F-4883-83DB-39BDD08F56A9_output" name="outputList" />
		<bpmn2:inputSet id="_SeT7MncVEeWEUNdIqX8sPw">
		<bpmn2:outputSet id="_SeT7M3cVEeWEUNdIqX8sPw">
	<bpmn2:dataInputAssociation id="_SeT7NHcVEeWEUNdIqX8sPw">
	<bpmn2:dataOutputAssociation id="_SeT7NXcVEeWEUNdIqX8sPw">
	<bpmn2:multiInstanceLoopCharacteristics id="_SeT7NncVEeWEUNdIqX8sPw">
		<bpmn2:inputDataItem xsi:type="bpmn2:tDataInput" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="in" />
		<bpmn2:outputDataItem xsi:type="bpmn2:tDataOutput" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="out"
			itemSubjectRef="_5F362DDC-075F-4883-83DB-39BDD08F56A9_multiInstanceItemType" />
		<bpmn2:completionCondition xsi:type="bpmn2:tFormalExpression" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			id="_SeT7N3cVEeWEUNdIqX8sPw">in == 0

The <ioSpecification>, <dataInputAssciation> and <dataOutputAssociation> elements are not permitted.

This is going to take some time to change for jBPM without breaking anything for standard BPMN2.

Comment 4 Robert (Bob) Brodt 2015-10-21 20:25:34 UTC
I added the ioSpecification and Data Input/Output Association elements just for jBPM. Please retest with build number of the editor, from here:


Comment 5 Jozef Marko 2015-10-26 09:15:31 UTC
Created attachment 1086427 [details]
multiple instance subprocess

Comment 6 Jozef Marko 2015-10-26 09:19:03 UTC
Bob please see the attachment 1086427 [details] . I created this project according reproduce steps. When you try to run ProcessMain class, you will obtain never ending loop.

Reproduced on eclipse luna + bpmn2 modeller

Comment 7 Robert (Bob) Brodt 2015-10-26 16:21:45 UTC
Hi Jozef, I imported the attached "bug.zip" project and ran ProcessMain, but did not see the error you described. I then added a ScriptTask inside the SubProcess (between Start and End) to print out the values of iteratorXYZ, and I do indeed see the correct values displayed.

Any idea WHERE the endless loop happens? I'm at a loss where to look for this problem...

Comment 8 Jozef Marko 2015-10-27 09:11:50 UTC
Bob my mistake, I was missing jBPM plugin in my eclipse. Works fine now. I will mark as verified when there will be some JBDSIS with this fix.

Comment 11 Robert (Bob) Brodt 2015-12-07 18:27:43 UTC
This is fixed in BPMN2 Modeler 1.1.4.Final (Luna) and 1.2.1.Final (Mars). Paul, which version of JBDSIS includes these?

Comment 12 Paul Leacu 2015-12-07 21:30:34 UTC
The latest Luna-based Integration stack is picking up this version of BPMN2 modeler:


The latest Mars-based Integration stack if picking up this version of BPMN2 Modeler:


I can mirror both the Mars and Luna .Final versions if you would like.  They'd be available in JBDSIS 8.0.5.GA (Luna) and JBDSIS 9.0.0.Beta1 (Mars).

Comment 13 Paul Leacu 2015-12-09 20:54:05 UTC
FYI - I've mirrored the latest stable BPMN2 Modeler for both Luna and Mars:


They will be available in JBDSIS 8.0.5.GA (Luna) and JBDSIS 9.0.0.Beta1 (Mars) respectively.

Comment 14 Jozef Marko 2016-01-19 14:20:16 UTC
Bob, when I am creating copy of attachment 1086427 [details] on jbdsis-8.0.5, BPMN2 Modeller 1.1.4.Final I am unable to run modeled process because <bpmn2:ioSpecification /> and <bpmn2:dataInputAssociation /> are completely missing inside of <bpmn2:subProcess/>

Please follow these steps:
1. New->Other->BPMN2->Generic BPMN 2.0 Diagram->Process
2. Create some process variable which will be used as collection input of multiple-instance subprocess
3. Add multiple-instance subprocess to canvas
4. set variable from step 2 as input collection for subprocess from step 3.
5. set also input instance parameter for subprocess from step 3.
6. check source of whole process
7. no <bpmn2:ioSpecification /> and <bpmn2:dataInputAssociation /> inside of <bpmns:subProcess/>

Comment 15 Jozef Marko 2016-01-20 07:51:28 UTC
Sorry, I was using incorrect wizard. If is first step replaced with:
New->Other->jBPM->jBPM Process Diagram, everything is fine.

Verified on jbdsis-8.0.5, BPMN2 Modeller 1.1.4.Final

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