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) 8.0.3.201508251633 JBoss Data Virtualization Development (ModeShape, Teiid Designer) 8.0.3.201508251633 JBoss Developer Studio (Core Features) 8.1.0.GA-v20150327-1349-B467 JBoss Fuse Development (Fuse tooling related to Camel route development) 8.0.3.201508251633 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 3.4.2.201412180340-r Eclipse Help System 2.0.103.v20150204-1700 Eclipse Java Development Tools 3.10.1.v20150204-1700 Java implementation of Git 3.4.2.201412180340-r 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: Easy 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.
Probably the same problem as mentioned here: https://bugzilla.redhat.com/show_bug.cgi?id=1263294#c7
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:dataInputRefs>_5F362DDC-075F-4883-83DB-39BDD08F56A9_input</bpmn2:dataInputRefs> </bpmn2:inputSet> <bpmn2:outputSet id="_SeT7M3cVEeWEUNdIqX8sPw"> <bpmn2:dataOutputRefs>_5F362DDC-075F-4883-83DB-39BDD08F56A9_output</bpmn2:dataOutputRefs> </bpmn2:outputSet> </bpmn2:ioSpecification> <bpmn2:dataInputAssociation id="_SeT7NHcVEeWEUNdIqX8sPw"> <bpmn2:sourceRef>inputList</bpmn2:sourceRef> <bpmn2:targetRef>_5F362DDC-075F-4883-83DB-39BDD08F56A9_input</bpmn2:targetRef> </bpmn2:dataInputAssociation> <bpmn2:dataOutputAssociation id="_SeT7NXcVEeWEUNdIqX8sPw"> <bpmn2:sourceRef>_5F362DDC-075F-4883-83DB-39BDD08F56A9_output</bpmn2:sourceRef> <bpmn2:targetRef>outputList</bpmn2:targetRef> </bpmn2:dataOutputAssociation> <bpmn2:multiInstanceLoopCharacteristics id="_SeT7NncVEeWEUNdIqX8sPw"> <bpmn2:loopDataInputRef>_5F362DDC-075F-4883-83DB-39BDD08F56A9_input</bpmn2:loopDataInputRef> <bpmn2:loopDataOutputRef>_5F362DDC-075F-4883-83DB-39BDD08F56A9_output</bpmn2:loopDataOutputRef> <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 </bpmn2:completionCondition> </bpmn2:multiInstanceLoopCharacteristics> </bpmn2:subProcess> 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.
I added the ioSpecification and Data Input/Output Association elements just for jBPM. Please retest with build number 1.1.4.201510212019 of the editor, from here: http://download.eclipse.org/bpmn2-modeler/updates/luna/1.1.4/
Created attachment 1086427 [details] multiple instance subprocess
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 1.1.4.201510212019
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...
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.
This is fixed in BPMN2 Modeler 1.1.4.Final (Luna) and 1.2.1.Final (Mars). Paul, which version of JBDSIS includes these?
The latest Luna-based Integration stack is picking up this version of BPMN2 modeler: http://download.jboss.org/jbosstools/updates/requirements/bpmn2-modeler/1.1.3.Final_1.1.0.Final_luna/ The latest Mars-based Integration stack if picking up this version of BPMN2 Modeler: http://download.jboss.org/jbosstools/updates/requirements/bpmn2-modeler/1.2.1.201509111741_1.2.1_mars/ 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).
FYI - I've mirrored the latest stable BPMN2 Modeler for both Luna and Mars: http://download.jboss.org/jbosstools/updates/requirements/bpmn2-modeler/1.1.4.Final_1.1.0.Final_luna/ http://download.jboss.org/jbosstools/updates/requirements/bpmn2-modeler/1.2.1.Final_1.2.1.Final_mars/ They will be available in JBDSIS 8.0.5.GA (Luna) and JBDSIS 9.0.0.Beta1 (Mars) respectively.
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/>
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