Bug 1178847 - XML parser: Missing a 'outputSet' element in 'ioSpecification' element for Multiple instances subprocess
Summary: XML parser: Missing a 'outputSet' element in 'ioSpecification' element for Mu...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Designer
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER4
: 6.1.0
Assignee: Tihomir Surdilovic
QA Contact: Kirill Gaevskii
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-05 14:40 UTC by Sona Mala
Modified: 2023-09-14 02:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:11:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sona Mala 2015-01-05 14:40:58 UTC
Description of problem:
jBPM Designer does not generate a 'outputSet' element in the 'ioSpecification' element in Multiple instances subprocess.

But the 'ioSpecification' element requires both elements (outputSet as well as inputSet). The cardinality of both elements are from 1 to *.

Saving of such process causes ERROR in server.log:

ERROR [org.drools.core.xml.ExtensibleXmlParser] (EJB default - 1) (null: 21, 31): cvc-complex-type.2.4.b: The content of element 'bpmn2:ioSpecification' is not complete. One of '{"http://www.omg.org/spec/BPMN/20100524/MODEL":inputSet, "http://www.omg.org/spec/BPMN/20100524/MODEL":outputSet}' is expected.

The outputSet element is not present even if I set the 'MI collection Output' property. The value of this property is lost after reopenning of process.


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


Steps to Reproduce:
1. Create new process (Start -> MI Subprocess -> End
2. Define Process Variables "test:String,test2:String"
3. Activate MI subprocess
4. Choose "test" in the "MI collection input" property.
5. Choose "test2" in the "MI collection output" property.
6. Show BPMN2 source code
7. Reopen process

Actual results:
Step 6:
      <bpmn2:ioSpecification id="__qIZsZTnEeSgV5GYSrrD3w">
        <bpmn2:dataInput id="_67ADB665-29CE-4F4E-8F1B-B46253B2E800_input" name="test"/>
        <bpmn2:inputSet id="__qIZspTnEeSgV5GYSrrD3w">
          <bpmn2:dataInputRefs>_67ADB665-29CE-4F4E-8F1B-B46253B2E800_input</bpmn2:dataInputRefs>
        </bpmn2:inputSet>
      </bpmn2:ioSpecification>

Step 7: The value of the "MI collection output" property is empty.


Expected results:
Step 6:

When MI collection output is not set:
      <bpmn2:ioSpecification id="...">
        <bpmn2:dataInput id="..." name="test"/>
        <bpmn2:inputSet id="...">
          <bpmn2:dataInputRefs>...</bpmn2:dataInputRefs>
        </bpmn2:inputSet>
        <bpmn2:outputSet id="..."/>
      </bpmn2:ioSpecification>

When MI collection output is set:
      <bpmn2:ioSpecification id="...">
        <bpmn2:dataInput id="..." name="test"/>
        <bpmn2:dataOutput id="..." name="test2"/>
        <bpmn2:inputSet id="...">
          <bpmn2:dataInputRefs>...</bpmn2:dataInputRefs>
        </bpmn2:inputSet>
        <bpmn2:outputSet id="...">
          <bpmn2:dataOutputRefs>...</bpmn2:dataOutputRefs>
        </bpmn2:outputSet>
      </bpmn2:ioSpecification>

Step 7: The "MI collection output" property contains a saved value.


Additional info:

Comment 1 Tihomir Surdilovic 2015-01-05 15:24:32 UTC
There are 4 properties for the mi subprocess

collection input, collection output, data input, data output

The data input set is generated given values of the collection input and the data input properties. The data output set is generated given the values of the collection output and the data output property values. 

You should set all four property values for a valid generation currently. If this is related to adding more validity checks in cases where some mi properties are missing please let me know as that would be valid request that we can tackle.

Comment 2 Sona Mala 2015-01-05 15:49:51 UTC
I hope that users can set just an input collection. The main issue of this bugzilla is that such process (just an input collection) is invalid and it causes ERROR in server.log.

I can confirm that if I set the 'MI data output' then 'MI collection output' is saved and BPMN2 code is valid.

My point of view is that designer cannot generate invalid BPMN2 code (missing 'outputSet').

Comment 3 Sona Mala 2015-01-05 15:59:45 UTC
I tested this feature and I find out that MI collection input is not saved until I set MI data input. So it is same as for MI collection output property.


Unfortunatelly, if I fill just collection properties then there is no validation errors (no problems in Problem tab -> it is not saved) and an user has no information about problems with MI inputs & outputs. The user lost his or she work.

Comment 4 Kris Verlaenen 2015-01-05 16:33:48 UTC
Note that this is related to https://bugzilla.redhat.com/show_bug.cgi?id=1146061, which deals specifically with the MI inputs.  I suggest we keep improvements to inputs there, and let this BZ focus on MI outputs.

Currently you need to set both MI collection output and MI data output to save the MI-related output data to XML correctly.

 * Can we at least add validation in designer so that if only one of both output properties is set, a validation error is shown?

 * If we could save one property if the other one isn't set (for example by using empty string for the other value), we would be able to save partial input.  If we do this, we could also let core engine validation take care of the first item, the validation.

Comment 5 Sona Mala 2015-01-06 11:45:51 UTC
Please, this issue is about MI inputs (only). If an user sets just MI input then jBPM Designer generates the valid BPMN2 code.

New steps to reproduce (without MI outputs):
1. Create new process (Start -> MI Subprocess -> End
2. Define Process Variables "test:String"
3. Activate MI subprocess
4. Choose "test" in the "MI collection input" property.
5. Set "MI data input" to "someItem"
6. Show BPMN2 source code
7. Reopen

Error message in server.log:

ERROR [org.drools.core.xml.ExtensibleXmlParser] (EJB default - 1) (null: 21, 31): cvc-complex-type.2.4.b: The content of element 'bpmn2:ioSpecification' is not complete. One of '{"http://www.omg.org/spec/BPMN/20100524/MODEL":inputSet, "http://www.omg.org/spec/BPMN/20100524/MODEL":outputSet}' is expected.


I would like to ask you to implement:
   - better Error message because it does not say which process is invalid.
   - valid BPMN2 code for process
           - 'ioSpecification' element has to contain 'inputSet' and 'outputSet' element

Note: Data Assignments of another tasks generates both elements too.

Comment 6 Sona Mala 2015-01-06 11:48:51 UTC
I am sorry I have made mistake in this sentence "If an user sets just MI input then jBPM Designer generates the valid BPMN2 code." There should be "the invalid BPMN2 code".

Comment 7 Tihomir Surdilovic 2015-01-08 01:50:57 UTC
two things added:

1. when the collection properties are set and the corresponding data input/output is blank (not set) there is now a warning message that tells users that it is not set currently

2. if user sets the collection properties but does not set the corresponding input/output params default ones will be generated for them


i will add a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1146061 separately (when no mi params are set at all the subprocess still round-trips as the correct type).


fix in designer master and 6.2.x branches

Comment 8 Sona Mala 2015-01-08 13:54:27 UTC
Hi Tiho,
please did you fix problems in comment 5?

> I would like to ask you to implement:
>   - better Error message because it does not say which process is invalid.
>   - valid BPMN2 code for process with MI inputs (without MI outputs)
>           - 'ioSpecification' element has to contain 'inputSet' and 'outputSet' element

Comment 9 Sona Mala 2015-02-04 12:21:08 UTC
I can confirm that the fix from comment #7 are present in 6.1.0 ER4.

Unfortunately, I can still reproduce the error message in server.log which was mentioned in Description:

ERROR [org.drools.core.xml.ExtensibleXmlParser] (EJB default - 1) (null: 21, 31): cvc-complex-type.2.4.b: The content of element 'bpmn2:ioSpecification' is not complete. One of '{"http://www.omg.org/spec/BPMN/20100524/MODEL":inputSet, "http://www.omg.org/spec/BPMN/20100524/MODEL":outputSet}' is expected.


This error occurs only in case that I fill just "MI collection input" and "MI data input" (MI outputs are empty). Steps to reproduce are in Comment #5.

Comment 10 Kirill Gaevskii 2015-12-09 08:40:09 UTC
6.2.GA still actual. Also if you start Verification with project from bug 1178847 comment 5 you will see no errors but in logs [1] presented.

[1] 09:35:15,826 ERROR [org.drools.core.xml.ExtensibleXmlParser] (http-localhost/127.0.0.1:8080-6) (null: 33, 31): cvc-complex-type.2.4.b: The content of element 'bpmn2:ioSpecification' is not complete. One of '{"http://www.omg.org/spec/BPMN/20100524/MODEL":inputSet, "http://www.omg.org/spec/BPMN/20100524/MODEL":outputSet}' is expected.

Comment 11 Red Hat Bugzilla 2023-09-14 02:52:57 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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