Bug 1168413 - BPMN2 process designed in Eclipse tooling plug-in/jBPM Web Designer does not generate the Assignment in dataInputAssociation for Skippable property for a User Task by default
Summary: BPMN2 process designed in Eclipse tooling plug-in/jBPM Web Designer does not ...
Status: VERIFIED
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Designer
Version: 6.0.3
Hardware: All
OS: All
urgent
high
Target Milestone: ER5
: 6.1.0
Assignee: Tihomir Surdilovic
QA Contact: Jozef Marko
Dawn Eisner
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-26 20:35 UTC by Musharraf Hussain
Modified: 2018-12-09 19:15 UTC (History)
6 users (show)

(edit)
Clone Of:
(edit)
Last Closed:


Attachments (Terms of Use)
jBPM6TaskSkippableTest.zip (31.13 KB, application/zip)
2014-11-26 20:35 UTC, Musharraf Hussain
no flags Details
usertasks (3.02 KB, application/zip)
2015-02-04 13:58 UTC, Jozef Marko
no flags Details

Description Musharraf Hussain 2014-11-26 20:35:39 UTC
Created attachment 961807 [details]
jBPM6TaskSkippableTest.zip

Description of problem:
- If we design a BPMN2 process from scratch in Eclipse Tooling plug-in, it does not generate the "Assignment" in "dataInputAssociation" for "Skippable" property for a "User Task" by default. So, when we try to write a simple code to read the "Skippable" property for a User Task designed in such a fashion it reads it to "true" , although in the designer we can see the check-box against "Skippable" property is still unchecked. The same issue is also observed if we generate a BPMN2 process in jBPM Web Designer too. Hence, I am not sure if the issue is really in the designers or the jBPM code. 

- The workaround is to first check the "Skippable" property and then again uncheck it. This generates the necessary assignments and the code returns the correct value as expected. 

- Also, the issue does not appear if I use jBPM 6.1.0.Final version of jars.

- Note I have used BPMS 6.0.3 for the jBPM Web Designer and the installed BPMN2 Diagram Editor version in JBDS 7.1.1 which I have used is (BPMN2 Modeler - Diagram Editor / 1.0.2.201402102317 / org.eclipse.bpmn2.modeler.feature.feature.group / Eclipse.org)

- Here is a comparison of the process definitions generated in both the designers, and how the source of the processes change after playing with the "Skippable" check-box a little.

BPMN2 Diagram Editor
=======================

Before workaround:
~~~
<bpmn2:ioSpecification id="_InputOutputSpecification_3">
...
        <bpmn2:dataInput id="_DataInput_13" itemSubjectRef="ItemDefinition_3" name="Skippable"/>
...
       <bpmn2:inputSet id="_InputSet_5" name="New Input Set">
...
          <bpmn2:dataInputRefs>_DataInput_13</bpmn2:dataInputRefs>
...
        </bpmn2:inputSet>
...
      <bpmn2:dataInputAssociation id="_DataInputAssociation_13">
        <bpmn2:targetRef>_DataInput_13</bpmn2:targetRef>
      </bpmn2:dataInputAssociation>
...
~~~

Change after workaround:
~~~
...
    <bpmn2:dataInputAssociation id="_DataInputAssociation_13">
        <bpmn2:targetRef>_DataInput_13</bpmn2:targetRef>
        <bpmn2:assignment id="Assignment_5">
          <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="FormalExpression_10">false</bpmn2:from>
          <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="FormalExpression_9">_DataInput_13</bpmn2:to>
        </bpmn2:assignment>
      </bpmn2:dataInputAssociation>
...
~~~

jBPM Web Designer
=======================

Before workaround:
~~~
...
      <bpmn2:ioSpecification id="_-pZVAHWkEeSUG-GZzG41KQ">
        <bpmn2:dataInput id="_979E19DE-261A-4099-8B53-D254A1E7EFBE_TaskNameInputX" name="TaskName"/>
        <bpmn2:inputSet id="_-pZVAXWkEeSUG-GZzG41KQ"/>
        <bpmn2:outputSet id="_-pZVAnWkEeSUG-GZzG41KQ"/>
      </bpmn2:ioSpecification>
      <bpmn2:dataInputAssociation id="_-pZVA3WkEeSUG-GZzG41KQ">
        <bpmn2:targetRef>_979E19DE-261A-4099-8B53-D254A1E7EFBE_TaskNameInputX</bpmn2:targetRef>
        <bpmn2:assignment id="_-pZVBHWkEeSUG-GZzG41KQ">
          <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="_-pZ8EHWkEeSUG-GZzG41KQ">UserOne</bpmn2:from>
          <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="_-pZ8EXWkEeSUG-GZzG41KQ">_979E19DE-261A-4099-8B53-D254A1E7EFBE_TaskNameInputX</bpmn2:to>
        </bpmn2:assignment>
      </bpmn2:dataInputAssociation>
...
~~~

Change after workaround:
~~~
...
    <bpmn2:ioSpecification id="_-pZVAHWkEeSUG-GZzG41KQ">
        <bpmn2:dataInput id="_979E19DE-261A-4099-8B53-D254A1E7EFBE_TaskNameInputX" name="TaskName"/>
        <bpmn2:dataInput id="DataInput_10" name="Skippable"/>
        <bpmn2:inputSet id="_-pZVAXWkEeSUG-GZzG41KQ">
          <bpmn2:dataInputRefs>DataInput_10</bpmn2:dataInputRefs>
        </bpmn2:inputSet>
        <bpmn2:outputSet id="_-pZVAnWkEeSUG-GZzG41KQ"/>
      </bpmn2:ioSpecification>
      <bpmn2:dataInputAssociation id="_-pZVA3WkEeSUG-GZzG41KQ">
        <bpmn2:targetRef>_979E19DE-261A-4099-8B53-D254A1E7EFBE_TaskNameInputX</bpmn2:targetRef>
        <bpmn2:assignment id="_-pZVBHWkEeSUG-GZzG41KQ">
          <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="_-pZ8EHWkEeSUG-GZzG41KQ">UserOne</bpmn2:from>
          <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="_-pZ8EXWkEeSUG-GZzG41KQ">_979E19DE-261A-4099-8B53-D254A1E7EFBE_TaskNameInputX</bpmn2:to>
        </bpmn2:assignment>
      </bpmn2:dataInputAssociation>
      <bpmn2:dataInputAssociation id="DataInputAssociation_10">
        <bpmn2:targetRef>DataInput_10</bpmn2:targetRef>
        <bpmn2:assignment id="Assignment_10">
          <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="FormalExpression_20">false</bpmn2:from>
          <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="FormalExpression_19">DataInput_10</bpmn2:to>
        </bpmn2:assignment>
      </bpmn2:dataInputAssociation>
...
~~~


Version-Release number of selected component (if applicable):
- BPMS 6.0.3
- JBDS 7.1.1
- BPMN2 Modeler - Diagram Editor (Version: 1.0.2.201402102317)

How reproducible:
- Always

Steps to Reproduce:
1. Import the attached project "jBPM6TaskSkippableTest.zip" into Eclipse/JBDS 
2. Try to run the "SkippableTaskTestClass" class with commenting and uncommenting the following lines to test an Eclipse designer generated and a jBPM Web Designer generated process individually.
~~~
		//Testing a process created through Eclipse Designer
		//ksession.startProcess("com.sample.bpmn.NonSkippable");
		
		
		//Testing a process created through jBPM Web Designer
		ksession.startProcess("TestProject.TestDefaultSkippable");

~~~

3. If required created a fresh BPMN2 process once using BPMN2 Diagram Editor in JBDS 7.1.1 and again in jBPM Web designer, where the process must have a User Task associated with it. Do not touch the "Skippable" property by any means and then try to execute the process and access the skippable property using this API
~~~
TaskSummary.isSkippable()
~~~
4. Please make sure to use "6.0.3-redhat-6" as jBPM version in the pom.xml so that we test it on Enterprise bits.

Actual results:
- The test results would print the value for "Skippable" property as "true" whereas the check-box in the designer for this property was unchecked.

Expected results:
- Ideally it should return "false" since the designer shows this property as unchecked.

Additional info:
- NA

Comment 2 Kris Verlaenen 2014-11-27 13:36:17 UTC
Since skippable defaults to "true" if no value is provided, could designer select the Skippable property by default if no value is defined in the process itself?

Comment 4 Alessandro Lazarotti 2015-01-13 00:20:49 UTC
the reply to Kris question is "yes". The main problem is about the inconsistency between the behaviour (skippable defaults to "true") and the diagram parameter (defaults to unchecked). Both need to be sync.

Comment 5 Tihomir Surdilovic 2015-01-13 19:39:02 UTC
Designer changes:

1. set the skippable property to default to "true" for a new user task
2. if bpmn2 is imported into designer that does not define the skippable property for user task, designer will now set this property by default to "true"

please let me know if there is anything else that needs to be done in designer for this

@Lazarrotti: I have pushed these changes to Designer master and 6.2.x branches. Please let me know what older branches this needs to be backported to (I assume 6.1.x and 6.0.x)? Thanks!

Comment 6 Alessandro Lazarotti 2015-01-13 19:59:33 UTC
Thank you Tiho,
For now we need only the commits to community 6.2.x branch.

We do not have requests to release it as patch to 6.0.x.

Question: this issue affects the web process Designer and the JBDS tooling. The same fix was applied to JBDS ?

Comment 7 Tihomir Surdilovic 2015-01-13 21:28:12 UTC
@Alessandro: Sorry I don't know about the JBDS tooling side in order to tell. What I did was for Designer only.

Comment 8 Tihomir Surdilovic 2015-01-14 01:48:17 UTC
per kris assigning issue to bob. please let me know if there is anything i can help with further

Comment 9 Kris Verlaenen 2015-01-15 15:49:25 UTC
Bob, could you make sure that the 'skippable' checkbox of a user task by default (when it's first added, or if no value is defined in the BPMN2) is selected (so set to true)?  If it's not set, the core engine will default to true, but the UI current defaults to unchecked (false).

Comment 10 Kris Verlaenen 2015-01-27 19:59:43 UTC
Bob, is this now fixed as part of https://bugzilla.redhat.com/show_bug.cgi?id=1183743 ?

Comment 11 Robert (Bob) Brodt 2015-01-27 22:33:20 UTC
Yes, this is fixed.

Comment 12 Jozef Marko 2015-02-04 13:58:30 UTC
Created attachment 988102 [details]
usertasks

usertasks with and without skippable assigment

Comment 13 Jozef Marko 2015-02-04 14:13:39 UTC
In the attachment 'usertasks' are two files.

'usertask.bpmn2' was created by BPMN2 Modeler 1.1.1.201501282123. Without any change in properties of 'User Task 1' was generated in xml assigment of skippable to true. Great.

'defaultusertask.bpmn2' is copy of 'usertask.bpmn2', but I have manually deleted this:
...
<bpmn2:assignment id="Assignment_5">
    <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="FormalExpression_9">true</bpmn2:from>
    <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="FormalExpression_10">DataInput_5</bpmn2:to>
</bpmn2:assignment>
...

When I import 'defaultusertask.bpmn2' to my project and open properties of 'User Task 1', skippable isn't chechked.

Kris, by your comment 9, If I import file like 'defaultusertask.bpmn2' shouldn't be checked 'Skippable' to true in properties view of 'User Task 1'?

Comment 14 Robert (Bob) Brodt 2015-02-09 19:04:55 UTC
There was a problem with imported process files with missing assignment expressions (as simulated by Jozef's experiment, above, removing the XML fragment).

Fixed in Luna build 1.1.2.201502091842
download.eclipse.org/bpmn2-modeler/updates/luna/1.1.2/

Fixed in Kepler build 1.0.4.201502091849
download.eclipse.org/bpmn2-modeler/updates/kepler/1.0.4/

Comment 15 Jozef Marko 2015-02-10 15:17:14 UTC
Verified on:
Luna - BPMN2 Modeler 1.1.2.201502091842. 
Kepler - BPMN2 Modeler 1.0.4.201502091849

Comment 16 Jozef Marko 2015-02-13 11:44:53 UTC
Not included in jbds-8.0.2.GA_jbdsis-8.0.0.CR2

Comment 18 Jozef Marko 2015-03-31 10:08:12 UTC
Verified on jbds-8.1.0.CR1_jbdsis-8.0.1.CR1 - BPMN2 Modeler 1.1.2.Final


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